Endpoint
Minimal request
Required headers
Minimum fields and streaming
For a normal response, text is usually read from
choices[0].message.content; for a streamed response, read each choices[0].delta.content. Verify the model and key with the non-streaming minimum request before enabling stream or adding optional fields.
Optional fields such as temperature, tool calls, vision input, and structured output are not guaranteed for every model merely because an API is “OpenAI-compatible.” Use the API and model capability matrix plus Model Marketplace for current model availability and supported capabilities.
Common failures
If you see
status_code=500, not implemented, do not retry it as a normal 500 at high frequency. It usually means that the model and request protocol do not match. Check whether supported_endpoint_types includes openai, then use the matching guide.
For any other error, keep the Request ID and use the self-check guide. Avoid rapid retries.
Related APIs
- List models visible to the current key and select a protocol: API basics
- Native Claude / Anthropic client: Anthropic Messages
- Codex Provider: Responses API and Codex
- Image generation: Image model guide
