API documentation
Parameters
Common generation, streaming, tool, embedding, and image parameters.
| Parameter | Where | Meaning |
|---|---|---|
| model | all | Exact model id from the catalog. |
| messages | chat/messages | Conversation history. |
| input | responses/embeddings | Responses prompt or embeddings input. |
| temperature | chat/responses | Randomness: lower is stricter, higher is more varied. |
| top_p | chat/responses | Nucleus sampling. Usually tune either top_p or temperature. |
| max_tokens | chat/messages | Output token cap. |
| max_output_tokens | responses | Output token cap for Responses. |
| stream | chat/responses | SSE streaming. |
| stream_options.include_usage | chat | Requests usage at the end of the stream when supported. |
| tools/tool_choice | chat/responses | Function calling when supported. |
| response_format | chat/responses | JSON mode/structured output when supported. |
| modalities | chat image | For Gemini image models: ["image", "text"]. |
| prompt | images | Image prompt. |
| images | image edits | Source images for /v1/images/edits. |
| messages.content[].image_url | chat image | Image input for Gemini image models. |
| image_config | chat image | Gemini image settings: aspect_ratio and image_size. |
| quality/size/n | images | Quality, size, and number of images. |
| duration/resolution/aspect_ratio | video | Length, resolution, and aspect ratio for video. |
| input_image/image_url/image | video | Source image for image-to-video. |
| audio | video | Audio flag when the selected video model supports it. |
| dimensions | embeddings | Vector 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.