Skip to content

New: DeepSeek V4.1 Flash Derisked. In chat and on the API.

See modelsWhat's newReport a bug
Open chat
API reference

API reference

Responses API: scope and limits

POST /responses is stateless: every request carries its whole input. It supports text, image and PDF input and instructions, function and custom tools (including namespaced tools and client tool search), MCP tools, the web search tool, structured output and streaming.

Endpoint
POST https://api.vani.ai/v1/responses
State
Stateless: store false or omitted
Output limit
max_output_tokens (see Output limits)
Streaming
stream: true (Responses events)
On this pageSupported

Supported

  • Text input (a string or message items with text parts) and instructions; full history including function_call, custom_tool_call and their outputs.
  • input_image (for models that can see) and input_file (a PDF in file_data or file_url) in user messages and function call outputs (see Images and PDFs on the API).
  • Function and custom tools, tool_choice, parallel_tool_calls, namespaced tools and client-executed tool search (a tool marked defer_loading is offered at once).
  • Structured output: text.format of type json_object or json_schema (name, schema up to 32 KiB, strict). The model is instructed to answer with JSON matching the schema; validate the result in your client.
  • MCP tools (see MCP tools on the API), reasoning.effort, metadata, user, safety_identifier, prompt_cache_key, service_tier auto/default (or priority where a fast model is listed).
  • The web search tool ({"type": "web_search"} or web_search_preview): Vani runs the searches and answers with web_search_call items and url_citation annotations (see Web search and web fetch tools).

Not supported

  • Stored state: store: true, previous_response_id, conversation and background mode are refused, and GET /responses/{id} answers 404 because nothing is stored. Send the complete input on every call.
  • Hosted tools other than web search: file search, image generation and computer use. Use function tools, or the media endpoints for images.
  • Audio input parts, and file_id references (send images and PDFs inline or by URL).
  • Encrypted reasoning items in input, top_logprobs, truncation other than disabled, max_tool_calls and prompt templates.

Note

An unsupported field is refused with 400 and named in the message (for example unsupported Responses field: top_logprobs); nothing is billed.

Note

include: ["reasoning.encrypted_content"] and reasoning.summary are accepted, because Codex sends them, but return nothing: no encrypted reasoning or reasoning summary is produced.

More reference: OpenAI-compatible API · Anthropic-compatible API · Model ids, limits, headers and usage · Images and PDFs on the API · MCP tools on the API · Web search and web fetch tools · Media API: images and videos · Artifacts API · Model changes: webhooks, feeds and the changes API · API overview · Docs and quickstart