Google Gemini streamGenerateContent on a PopNow text model
Same request as generateContent. With ?alt=sse (what the Google GenAI SDKs send) the response is a server-sent event stream where each data: line is one GenerateContentResponse; the final one carries finishReason and usageMetadata. There is no [DONE] sentinel. Without alt=sse the response is a JSON array of GenerateContentResponse objects written progressively.
Billing: chat models are priced per token in credits (1 credit = $0.001), listed per 1M input and output tokens in credits on GET /api/v1/models and GET /v1/models. When the request is accepted, the most it can cost is held from your balance, computed from the input and max_tokens (the model's maximum output when you omit it, so set max_tokens to keep holds small). When the reply ends you are charged its actual usage in fractional credits, with no per-request minimum, and the rest of the hold is released. A balance below the hold, or a key spend limit that would be exceeded, returns 402 before anything is sent to the model. A request that fails or that the model refuses is refunded in full. The X-PopNow-Task-Id response header names the task; GET /api/v1/jobs/recordInfo shows the final charge in cost (USD) and exactCredits. Message text is not kept after the charge settles. Requests are forwarded to the model as sent and each model's own usage policy applies.
Request
- Base URL: https://api.popnow.ai
- URL: https://api.popnow.ai/v1beta/models/{model}:streamGenerateContent
- Auth: HTTP bearer
Path parameters
Query parameters
Headers
Stable key for one logical task submission; retained for 24 hours per account and bound to both the submitting API key and normalized request fingerprint. A sibling key receives 409 without the original task ID.
Request body
Response
An SSE stream (alt=sse) or a JSON array of GenerateContentResponse.
Changes
No recorded changes to this operation across all 1 revision of this API.