Docs
Responses API
Updated 2026-08-29
/v1/responses is one of OpenAI’s primary native endpoints. OpenAI recommends evaluating Responses for new projects; if your client or framework defaults to Chat Completions, use OpenAI-compatible calls.
The Base URL remains https://api.rokoapi.com/v1.
Endpoint
POST /v1/responses
Quick Start
curl https://api.rokoapi.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"input": "Introduce yourself in one sentence",
"instructions": "You are a concise assistant"
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.rokoapi.com/v1",
)
response = client.responses.create(
model="gpt-4o",
input="Introduce yourself in one sentence",
instructions="You are a concise assistant",
)
print(response.output_text)
For text extraction, prefer the SDK’s output_text; when manually iterating over output , note that the first item may be reasoning rather than message.
Common Parameters
| Parameter | Description |
|---|---|
model | Model ID of an available model that supports Responses |
input | String or array of messages |
instructions | System instructions (similar to a system prompt) |
max_output_tokens | Maximum output tokens |
stream | Semantic event stream |
tools / tool_choice | Functions and built-in tools (subject to upstream support) |
Model capability labels
Model pages display the Responses capabilities configured in the admin console. Check these labels before sending a request:
| Label | Meaning |
|---|---|
responses-native | The upstream provider supports the Responses protocol natively |
responses-compatible | The gateway converts the request to another upstream protocol; only declared capabilities are guaranteed |
structured-outputs | JSON Schema structured outputs are supported |
previous-response-id | previous_response_id can continue a response |
conversation-state | Upstream-managed conversation state is supported |
responses-compact | POST /v1/responses/compact is supported |
stored-responses | The store option is supported |
parallel-tool-calls | Parallel tool calls are supported |
max-tool-calls | The max_tool_calls limit is supported |
Clients must not assume capabilities that are not shown. Compatibility-converted models do not advertise features that depend on an upstream resource lifecycle, such as conversation state, stored responses, or compaction.
Current compatibility-converted models
| Model | Conversion | Supported behavior |
|---|---|---|
deepseek-v4-flash | Responses to and from DeepSeek Chat Completions | Text, function tools, tool results, and streaming events |
deepseek-v4-pro | Responses to and from DeepSeek Chat Completions | Text, function tools, tool results, and streaming events |
glm-5.3 | Responses to and from Zhipu V4 Chat Completions | Text, function tools, tool results, and streaming events |
glm-5.3-flash | Responses to and from Zhipu V4 Chat Completions | Text, function tools, tool results, and streaming events |
These models use stateless compatibility conversion. Keep the full conversation and tool-call history on the client and send it again in the next input. They do not support previous_response_id, conversation, compact, or stored responses.
Multi-turn Conversations
By default, maintain conversation history on the client side and include the full context in the input array. Use stateful parameters only when the model page explicitly shows previous-response-id or conversation-state.
Streaming Output
Responses streaming uses semantic events (e.g., response.output_text.delta), unlike Chat Completions’ choices[0].delta . Set stream: true and handle events by type.
Comparison with Chat Completions
| Chat Completions | Responses |
|---|---|
messages | input |
| System message | instructions |
max_tokens | max_output_tokens |
choices[0].message.content | output_text |
Notes
- First, check the Models page or the available models documentation to confirm whether the target model supports Responses.
- Built-in tools, background tasks, and similar capabilities depend on upstream support; capabilities that are not declared on the model page are not part of the compatibility contract.