OpenAI Compatible

Google Gemini streamGenerateContent on a SpicyAPI 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.

post/v1beta/models/{model}:streamGenerateContent

Request

  • Base URL: https://api.spicyapi.ai
  • URL: https://api.spicyapi.ai/v1beta/models/{model}:streamGenerateContent
  • Auth: HTTP bearer

Path parameters

modelstring required

Query parameters

alt'sse'

Headers

Idempotency-Keystring

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

systemInstructionobject
toolsobject[]
toolConfigobject

Response

An SSE stream (alt=sse) or a JSON array of GenerateContentResponse.

modelVersionstring

The SpicyAPI model identifier.

responseIdstring

Changes

No recorded changes to this operation across all 1 revision of this API.