Responses
Create a model response in OpenAI’s Responses API format. Works with every Venice text model and returns typed output items such as reasoning, message, and function_call. Set stream: true to receive Server-Sent Events.
Most OpenAI models are forwarded to OpenAI’s Responses API natively. Other models, and requests that use Venice features such as web search or characters, are translated through Chat Completions, where some Responses features are not supported. Send x-venice-responses-mode: native or compat to choose the mode, and read the x-venice-responses-lane response header to see which one served the request.
A top-level web_search tool with external_web_access: false is omitted rather than forcing compatibility mode. It does not enable live web search on the compatibility path. Live search tools and search tools loaded through history still require compatibility mode.
Venice does not store responses, so send the full conversation in input on every request. E2EE-capable models are not supported on this endpoint; use /api/v1/chat/completions with the required E2EE headers instead.
See the Responses API guide for the features and limitations of each mode.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions. A 401 response with code X402_USER_NOT_ALLOWED means the wallet’s Venice account is banned or deleted, or the wallet’s x402 credit account belongs to a different user.
curl --request POST \
--url https://api.venice.ai/api/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "zai-org-glm-5-1",
"input": "<string>",
"instructions": "<string>",
"include": [
"<string>"
],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [
{
"model": "claude-opus-4-8"
}
],
"reasoning": {
"enabled": true
},
"parallel_tool_calls": true,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true,
"defer_loading": true
},
"defer_loading": true
}
],
"tool_choice": "auto",
"prompt_cache_retention": "24h",
"web_search": true,
"stream": true,
"text": {
"format": {
"type": "text"
}
},
"anon_user_id": "end-user-123",
"venice_parameters": {
"character_slug": "<string>",
"enable_e2ee": true,
"enable_web_scraping": true,
"enable_web_citations": true,
"include_venice_system_prompt": true,
"include_search_results_in_stream": true
}
}
'import requests
url = "https://api.venice.ai/api/v1/responses"
payload = {
"model": "zai-org-glm-5-1",
"input": "<string>",
"instructions": "<string>",
"include": ["<string>"],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [{ "model": "claude-opus-4-8" }],
"reasoning": { "enabled": True },
"parallel_tool_calls": True,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True,
"defer_loading": True
},
"defer_loading": True
}
],
"tool_choice": "auto",
"prompt_cache_retention": "24h",
"web_search": True,
"stream": True,
"text": { "format": { "type": "text" } },
"anon_user_id": "end-user-123",
"venice_parameters": {
"character_slug": "<string>",
"enable_e2ee": True,
"enable_web_scraping": True,
"enable_web_citations": True,
"include_venice_system_prompt": True,
"include_search_results_in_stream": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'zai-org-glm-5-1',
input: '<string>',
instructions: '<string>',
include: ['<string>'],
max_output_tokens: 1,
temperature: 1,
top_p: 0.5,
fallbacks: [{model: 'claude-opus-4-8'}],
reasoning: {enabled: true},
parallel_tool_calls: true,
tools: [
{
type: 'function',
function: {
name: '<string>',
description: '<string>',
parameters: {},
strict: true,
defer_loading: true
},
defer_loading: true
}
],
tool_choice: 'auto',
prompt_cache_retention: '24h',
web_search: true,
stream: true,
text: {format: {type: 'text'}},
anon_user_id: 'end-user-123',
venice_parameters: {
character_slug: '<string>',
enable_e2ee: true,
enable_web_scraping: true,
enable_web_citations: true,
include_venice_system_prompt: true,
include_search_results_in_stream: true
}
})
};
fetch('https://api.venice.ai/api/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.venice.ai/api/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'zai-org-glm-5-1',
'input' => '<string>',
'instructions' => '<string>',
'include' => [
'<string>'
],
'max_output_tokens' => 1,
'temperature' => 1,
'top_p' => 0.5,
'fallbacks' => [
[
'model' => 'claude-opus-4-8'
]
],
'reasoning' => [
'enabled' => true
],
'parallel_tool_calls' => true,
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true,
'defer_loading' => true
],
'defer_loading' => true
]
],
'tool_choice' => 'auto',
'prompt_cache_retention' => '24h',
'web_search' => true,
'stream' => true,
'text' => [
'format' => [
'type' => 'text'
]
],
'anon_user_id' => 'end-user-123',
'venice_parameters' => [
'character_slug' => '<string>',
'enable_e2ee' => true,
'enable_web_scraping' => true,
'enable_web_citations' => true,
'include_venice_system_prompt' => true,
'include_search_results_in_stream' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.venice.ai/api/v1/responses"
payload := strings.NewReader("{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.venice.ai/api/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_abc123",
"object": "response",
"created_at": 123,
"model": "<string>",
"status": "completed",
"output": [
{
"type": "reasoning",
"id": "<string>",
"summary": [
"<string>"
],
"encrypted_content": "<string>"
}
],
"incomplete_details": {
"reason": "max_output_tokens"
},
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
Request body for the Responses API endpoint. E2EE-capable models are not supported on /api/v1/responses; use /api/v1/chat/completions with the required E2EE headers instead.
The input to generate a response for. Can be a simple string or an array of messages.
A list of tools the model may call.
- Function Tool
- Tool Definition
- Web Search Tool
- X Search Tool
- Code Interpreter Tool
- File Search Tool
- Computer Use Tool
- Generic Tool
Show child attributes
Show child attributes
Text output options. format requests structured output: json_schema with a name and schema, or json_object. Models without structured output support return 400.
Show child attributes
Show child attributes
Optional identifier for the API customer's end user. Combined with the Venice user id when attributing the request to upstream providers. Distinct from the discarded OpenAI user field. Must be printable ASCII and must not contain ||.
1 - 128^[\x20-\x7E]+$"end-user-123"
Response
Successful response
Response from the Responses API endpoint.
The output items generated by the model.
- Reasoning Output
- Message Output
- Function Call Output
- Option 4
- Option 5
- Web Search Call Output
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.venice.ai/api/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "zai-org-glm-5-1",
"input": "<string>",
"instructions": "<string>",
"include": [
"<string>"
],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [
{
"model": "claude-opus-4-8"
}
],
"reasoning": {
"enabled": true
},
"parallel_tool_calls": true,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true,
"defer_loading": true
},
"defer_loading": true
}
],
"tool_choice": "auto",
"prompt_cache_retention": "24h",
"web_search": true,
"stream": true,
"text": {
"format": {
"type": "text"
}
},
"anon_user_id": "end-user-123",
"venice_parameters": {
"character_slug": "<string>",
"enable_e2ee": true,
"enable_web_scraping": true,
"enable_web_citations": true,
"include_venice_system_prompt": true,
"include_search_results_in_stream": true
}
}
'import requests
url = "https://api.venice.ai/api/v1/responses"
payload = {
"model": "zai-org-glm-5-1",
"input": "<string>",
"instructions": "<string>",
"include": ["<string>"],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [{ "model": "claude-opus-4-8" }],
"reasoning": { "enabled": True },
"parallel_tool_calls": True,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True,
"defer_loading": True
},
"defer_loading": True
}
],
"tool_choice": "auto",
"prompt_cache_retention": "24h",
"web_search": True,
"stream": True,
"text": { "format": { "type": "text" } },
"anon_user_id": "end-user-123",
"venice_parameters": {
"character_slug": "<string>",
"enable_e2ee": True,
"enable_web_scraping": True,
"enable_web_citations": True,
"include_venice_system_prompt": True,
"include_search_results_in_stream": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'zai-org-glm-5-1',
input: '<string>',
instructions: '<string>',
include: ['<string>'],
max_output_tokens: 1,
temperature: 1,
top_p: 0.5,
fallbacks: [{model: 'claude-opus-4-8'}],
reasoning: {enabled: true},
parallel_tool_calls: true,
tools: [
{
type: 'function',
function: {
name: '<string>',
description: '<string>',
parameters: {},
strict: true,
defer_loading: true
},
defer_loading: true
}
],
tool_choice: 'auto',
prompt_cache_retention: '24h',
web_search: true,
stream: true,
text: {format: {type: 'text'}},
anon_user_id: 'end-user-123',
venice_parameters: {
character_slug: '<string>',
enable_e2ee: true,
enable_web_scraping: true,
enable_web_citations: true,
include_venice_system_prompt: true,
include_search_results_in_stream: true
}
})
};
fetch('https://api.venice.ai/api/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.venice.ai/api/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'zai-org-glm-5-1',
'input' => '<string>',
'instructions' => '<string>',
'include' => [
'<string>'
],
'max_output_tokens' => 1,
'temperature' => 1,
'top_p' => 0.5,
'fallbacks' => [
[
'model' => 'claude-opus-4-8'
]
],
'reasoning' => [
'enabled' => true
],
'parallel_tool_calls' => true,
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true,
'defer_loading' => true
],
'defer_loading' => true
]
],
'tool_choice' => 'auto',
'prompt_cache_retention' => '24h',
'web_search' => true,
'stream' => true,
'text' => [
'format' => [
'type' => 'text'
]
],
'anon_user_id' => 'end-user-123',
'venice_parameters' => [
'character_slug' => '<string>',
'enable_e2ee' => true,
'enable_web_scraping' => true,
'enable_web_citations' => true,
'include_venice_system_prompt' => true,
'include_search_results_in_stream' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.venice.ai/api/v1/responses"
payload := strings.NewReader("{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.venice.ai/api/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"zai-org-glm-5-1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"max_output_tokens\": 1,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"fallbacks\": [\n {\n \"model\": \"claude-opus-4-8\"\n }\n ],\n \"reasoning\": {\n \"enabled\": true\n },\n \"parallel_tool_calls\": true,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true,\n \"defer_loading\": true\n },\n \"defer_loading\": true\n }\n ],\n \"tool_choice\": \"auto\",\n \"prompt_cache_retention\": \"24h\",\n \"web_search\": true,\n \"stream\": true,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"anon_user_id\": \"end-user-123\",\n \"venice_parameters\": {\n \"character_slug\": \"<string>\",\n \"enable_e2ee\": true,\n \"enable_web_scraping\": true,\n \"enable_web_citations\": true,\n \"include_venice_system_prompt\": true,\n \"include_search_results_in_stream\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_abc123",
"object": "response",
"created_at": 123,
"model": "<string>",
"status": "completed",
"output": [
{
"type": "reasoning",
"id": "<string>",
"summary": [
"<string>"
],
"encrypted_content": "<string>"
}
],
"incomplete_details": {
"reason": "max_output_tokens"
},
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}{
"error": "<string>"
}{
"error": "<string>"
}