v3

latestOpenAPI 3.1.02026-07-311,4541,5202.3 MB
gateway

Create a response

Create an OpenAI-compatible response through Respan. Enter RESPAN_API_KEY in the Authorization control, choose the openai, azure, or perplexity example, and replace PROVIDER_API_KEY with that provider's key. Each example owns its fixed route-provider header and compatible request shape. The OpenAI example is otherwise ready to run. For Azure, also replace YOUR_AZURE_DEPLOYMENT and YOUR_RESOURCE; a Responses-compatible api_version is prefilled. Switching examples clears provider-specific fields left by the previous selection. Provider credentials may alternatively be stored in Settings -> Providers. Successful responses include X-Respan-Log-Id and are logged with the actual provider model and cost.

post/api/responses

Query parameters

format'json' | 'txt'

Headers

Authorizationstring required

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.

X-Respan-Route-Provider'openai' | 'azure' | 'perplexity'

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.

Request body

modelstring

OpenAI: use a supported model such as gpt-4o-mini. Azure: use azure/<your-deployment-name>. Perplexity: use a provider-prefixed model, or omit model when using preset or models.

streamboolean

Return Responses API server-sent events when true.

presetstring

Perplexity Agent API preset. May be used without model.

modelsstring[]

Perplexity Agent API fallback model chain, tried in order.

max_stepsinteger

Maximum Perplexity agent steps.

language_preferencestring

Preferred response language for Perplexity Agent API.

response_formatApiResponsesPostRequestBodyContentApplicationJsonSchemaResponseFormat

Perplexity Agent API structured response configuration.

Response

Response object or event stream from the selected Responses upstream.

object required