OpenAI Compatible

Google Gemini generateContent on a SpicyAPI text model

Accepts a Google Gemini generateContent request (contents with text / inlineData / functionCall / functionResponse parts, systemInstruction, tools.functionDeclarations, toolConfig, generationConfig such as temperature, topP, maxOutputTokens, stopSequences, responseMimeType, responseSchema, thinkingConfig). {model} is a SpicyAPI text model identifier from /v1/models and may contain a slash (for example google/gemini-3-flash-preview). Validation, pricing and availability are identical to /v1/chat/completions. The response is one GenerateContentResponse. Errors use the Google {error:{code,message,status}} shape. A call still running after about 30 seconds is kept open with leading whitespace and the X-Spicy-Keepalive: 1 header, as described on /v1/chat/completions; a failure after that point is the same error object inside a 200 response.

post/v1beta/models/{model}:generateContent

Request

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

Path parameters

modelstring required

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

One GenerateContentResponse.

modelVersionstring

The SpicyAPI model identifier.

responseIdstring

Changes

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