Create a response
Creates an OpenAI-compatible response through Respan. Choose the OpenAI, Azure, or Perplexity example and replace PROVIDER_API_KEY with that provider’s key. For Azure, also replace YOUR_AZURE_DEPLOYMENT and YOUR_RESOURCE. Provider credentials can instead be stored in Settings > Providers. Successful responses include X-Respan-Log-Id and are logged with the provider model and cost.
Authentication
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.
Headers
Responses upstream. Each named API Explorer example prepopulates its matching value; keep the header paired with the selected example. The Perplexity opt-in is header-only, case-insensitive, and whitespace-tolerant.
Query parameters
Request
OpenAI Responses API request. Standard Responses fields are accepted. Perplexity extensions are accepted only when X-Respan-Route-Provider is perplexity. Respan cache controls and customer_identifier may be sent at the request root or under respan_params; nested values win when both are present.
OpenAI: use a supported model such as gpt-4o-mini. Azure: use azure/<your-deployment-name>. Perplexity: use a provider-prefixed model, such as perplexity/sonar, or send models instead.
Return Responses API server-sent events when true.
Perplexity Agent API preset, such as medium. Send it with model or models: a preset alone fails Respan’s model validation.
Response tools. Perplexity supports web_search with filters such as search_domain_filter.
Respan metadata, prompt configuration, customer identifiers, provider credentials, and other gateway parameters. route_provider_override here cannot activate the Perplexity route.
Cache lifetime in seconds. A response stored without cache_ttl is served from the cache for at most 30 minutes.
End-customer identifier used for logging and optional cache partitioning.