API documentation

Parameters

Common generation, streaming, tool, embedding, and image parameters.

ParameterWhereMeaning
modelallExact model id from the catalog.
messageschat/messagesConversation history.
inputresponses/embeddingsResponses prompt or embeddings input.
temperaturechat/responsesRandomness: lower is stricter, higher is more varied.
top_pchat/responsesNucleus sampling. Usually tune either top_p or temperature.
max_tokenschat/messagesOutput token cap.
max_output_tokensresponsesOutput token cap for Responses.
streamchat/responsesSSE streaming.
stream_options.include_usagechatRequests usage at the end of the stream when supported.
tools/tool_choicechat/responsesFunction calling when supported.
response_formatchat/responsesJSON mode/structured output when supported.
modalitieschat imageFor Gemini image models: ["image", "text"].
promptimagesImage prompt.
imagesimage editsSource images for /v1/images/edits.
messages.content[].image_urlchat imageImage input for Gemini image models.
image_configchat imageGemini image settings: aspect_ratio and image_size.
quality/size/nimagesQuality, size, and number of images.
duration/resolution/aspect_ratiovideoLength, resolution, and aspect ratio for video.
input_image/image_url/imagevideoSource image for image-to-video.
audiovideoAudio flag when the selected video model supports it.
dimensionsembeddingsVector size when supported.

Parameter debugging

  • If a request fails, retry with only model, input/messages, and auth.
  • Add optional parameters back one at a time.
  • Some providers ignore unsupported fields; others return 400.
  • service_tier and similar premium parameters can be filtered or disabled to avoid unexpected surcharges.