v1/responses endpoint.If you’re already using OpenAI’s Responses API you can usually swap the base URL, provide a Sudo API key, and you’re done. Base URL:
https://sudoapp.dev/apiResponses endpoint:
/v1/responses
This interface only supports OpenAI models (for example
Sudo forwards requests directly to OpenAI’s Responses API with one-to-one parity, which makes it ideal for agent-style workflows, tools-heavy orchestration, and modern OpenAI-first features that go beyond classic chat completions.
gpt-4.1, gpt-4.1-mini, o3-mini, etc.).Sudo forwards requests directly to OpenAI’s Responses API with one-to-one parity, which makes it ideal for agent-style workflows, tools-heavy orchestration, and modern OpenAI-first features that go beyond classic chat completions.
/v1/chat/completions, rate limiting and error handling are managed by Sudo’s AI router – behavior is identical to the canonical /v1/chat/completions endpoint.
Requests
YouPOST to /v1/responses with the same shape OpenAI expects.Below is an example condensed TypeScript definition (non-exhaustive) that highlights the most commonly used fields:
Item types for tools, MCP, computer use, etc.), see the official OpenAI Responses API reference.
Headers
Only two headers are required:Minimal JSON example
The smallest useful request can be just a model and a string input:Minimal Request
Structured Input Request
Example: non‑streaming curl
curl
Responses
Sudo returns the same schema as the OpenAI Responses API, including theresponse object and output items.
Response Schema (simplified)
Example response
Example Response
Errors
Error envelopes are identical to the rest of the Sudo AI router (including/v1/chat/completions), for example:
Error
Streaming
When you set"stream": true in the request body, Sudo will stream Server‑Sent Events (SSE) that mirror the OpenAI Responses streaming format.
Unlike /v1/chat/completions streaming, which sends delta chunks for choices[].delta, the Responses API streams typed events such as:
response.created: the response object has been created.response.output_text.delta: incremental text tokens being generated.response.output_text.done: the final text segment for an output item.response.completed: the entire response has finished.error: an error occurred while generating the response.
type field. A typical stream might start like:
SSE events (truncated)
Example: streaming curl
curl (streaming)
Rate limiting & behavior
- Rate limits: The Responses API is subject to the same Sudo-side rate limiting as
/v1/chat/completions(per‑app, per‑developer, and provider‑level throttling). - Error handling: Errors are normalized and returned using the same
ErrorResponseshape as the rest of the AI router.