4e064cf81dae
latestOpenAPI 3.1.02026-08-131831,331960.0 KBCreate chat completion
Send a chat completion request through the Respan gateway. Supports 250+ models across OpenAI, Anthropic, Google, Azure, and more with automatic logging, fallbacks, caching, and prompt management.
Accepts all OpenAI chat completion parameters. Respan-specific parameters can be passed three ways:
- Top-level body fields - add directly to the request body
- Nested under respan_params - explicit namespacing to avoid conflicts
- Header X-Data-Respan-Params - base64-encoded JSON header
Merge order: top-level body fields > respan_params > header.
Legacy compatibility:
- keywordsai_params is still accepted and merged into respan_params
- X-Data-Keywordsai-Params is still accepted and auto-renamed internally
When using the OpenAI SDK, pass Respan parameters via extra_body.
Headers
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
Base64-encoded JSON object of Respan parameters. Legacy X-Data-Keywordsai-Params is still accepted.
Pin the request to a specific provider without changing the model slug. Example: vertex_ai routes a claude-sonnet-4-5-20250929 request to Vertex AI Claude.
Comma-separated beta feature flags. Available: token-breakdown-2026-03-26, env-scoped-integrations-2026-03-28
Request body
Response
Successful response for Create chat completion