/v1/responses is OpenAI’s current flagship native endpoint. In OpenAI’s own words: “While Chat Completions remains supported, Responses is recommended for all new projects.” APIYI fully supports this endpoint — just point base_url at https://api.apiyi.com/v1.
This page is based on the official OpenAI documentation (developers.openai.com/api/docs, as of June 2026). All examples are copy-paste ready.
Why Responses
Compared with Chat Completions, OpenAI cites three hard numbers:- Better reasoning: the same reasoning model scores about 3% higher on SWE-bench via Responses (reasoning state persists across turns)
- Cheaper input: cache utilization is 40%–80% higher than Chat Completions (OpenAI internal testing), which directly cuts your input bill
- More tools: built-in tools like
web_searchandcode_interpreterare Responses-only
/v1/chat/completions), or you want one codebase that also calls Claude, Gemini, and other non-OpenAI models — see Compatible Mode.
What is deprecated is the Assistants API (scheduled to shut down on August 26, 2026 (UTC)), not Chat Completions. Both endpoints remain supported long-term; new features simply land on Responses first.
Quick Start
Request Parameters
Response Structure
output is an array of items. The three common types: reasoning (reasoning summary), message (text reply), and function_call (a function call request). A trimmed example:
usage fields worth watching:
input_tokens_details.cached_tokens: input that hit the cache (billed at 0.1×)output_tokens_details.reasoning_tokens: reasoning spend (billed at the output rate; tune withreasoning.effort)
Multi-turn: maintain history yourself
When calling the Responses API through APIYI, pass the full history as theinput array (each entry with role / content), the same approach as Chat Completions:
Reasoning and Output Controls
Choosing reasoning.effort
text.verbosity
low / medium (default) / high controls answer length. Responses-only:
Streaming
Responses streams semantic events, not the genericchoices[0].delta chunks of Chat Completions. Core events:
Built-in Tools
Built-in tools are a Responses-only capability — declare them intools and OpenAI executes them server-side:
Minimal
web_search example:
Built-in tools execute on OpenAI’s side; pass-through support per tool on the APIYI channel should be confirmed by testing. Custom function calling is fully supported — see Function Calling.
Pro Models and Background Mode
gpt-5.4-pro and gpt-5.5-pro are deep-reasoning models for professional workloads ($30 / $180 per million tokens, svip group only) and are, in practice, available via /v1/responses only. A single request can take minutes — pair them with background: true:
Supported Models and Pricing
Pinned date versions (e.g.
gpt-5.4-2026-03-05) are also available at the same price. Full list: Models & Pricing.
Mapping from Chat Completions
Field mapping when migrating from/v1/chat/completions:
Client Support Status
Why do most VS Code-family IDEs and plugins (Cline, Trae, etc.) only support/v1/chat/completions and not the Responses endpoint covered on this page?
- chat/completions is the de facto industry standard: third-party gateways, local inference runtimes (Ollama / vLLM / LM Studio), and non-OpenAI vendors all implement it, so one handler covers hundreds of providers — while
/v1/responsesis still essentially an OpenAI-only dialect - Responses is not a URL swap: semantic event streaming (not delta concatenation), item-based output, and reasoning-state passing are all fundamentally different from chat/completions — clients have to rewrite their entire agent loop
- Chicken-and-egg: clients don’t implement it because most custom endpoints (gateways) don’t serve responses, and gateways aren’t in a hurry for the same reason. APIYI already hosts
/v1/responses(this page), so there is no gateway-side blocker
For GPT-5.4+ “reasoning plus tool calling” workloads, Codex CLI / opencode are the first choice — point the Base URL at
https://api.apiyi.com/v1. If gpt-5.4 is enough and you want to stay in a VS Code-family IDE (including Trae), install the Roo Code plugin and pick its OpenAI provider.
Troubleshooting
Related Links
- This group: Compatible Mode · Cache Billing · Function Calling
- Get / manage tokens:
https://api.apiyi.com/token - OpenAI migration guide:
developers.openai.com/api/docs/guides/migrate-to-responses