Responses
Alpha - This endpoint is currently available to Alpha testers only.
Creates a model response using the Responses API format. This is an OpenAI-compatible endpoint for Venice text models.
E2EE Model Limitation - E2EE-capable models are not supported on /api/v1/responses. Use /api/v1/chat/completions with the required E2EE headers instead.
Stateless Only - This API is stateless. Each request is independent and no conversation state is persisted between requests. You must include the full conversation history in each request.
The Responses API provides a structured output format with typed blocks for:
- Reasoning: Thought process and reasoning chains from reasoning models
- Messages: The main text response from the model
- Function Calls: Tool/function call outputs
- Web Search: Results from web search if enabled
This endpoint supports streaming via Server-Sent Events when stream: true is set.
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.
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>",
"include": [
"<string>"
],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [
{
"model": "claude-opus-4-8"
}
],
"reasoning": {
"enabled": true
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": "auto",
"web_search": true,
"stream": true,
"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>",
"include": ["<string>"],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [{ "model": "claude-opus-4-8" }],
"reasoning": { "enabled": True },
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
}
],
"tool_choice": "auto",
"web_search": True,
"stream": True,
"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>',
include: ['<string>'],
max_output_tokens: 1,
temperature: 1,
top_p: 0.5,
fallbacks: [{model: 'claude-opus-4-8'}],
reasoning: {enabled: true},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}, strict: true}
}
],
tool_choice: 'auto',
web_search: true,
stream: true,
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>',
'include' => [
'<string>'
],
'max_output_tokens' => 1,
'temperature' => 1,
'top_p' => 0.5,
'fallbacks' => [
[
'model' => 'claude-opus-4-8'
]
],
'reasoning' => [
'enabled' => true
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
]
],
'tool_choice' => 'auto',
'web_search' => true,
'stream' => true,
'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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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": "<string>"
}{
"error": "<string>"
}instructions, text.format, previous_response_id, reasoning replay, and provider-hosted tools. The Venice system prompt is also on by default here. See the Responses API guide for the full list and workarounds.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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 ID of the model to use. E2EE-capable models are not supported on /api/v1/responses; use /api/v1/chat/completions with the required E2EE headers instead.
"zai-org-glm-5-1"
The input to generate a response for. Can be a simple string or an array of messages.
Additional response fields to include (OpenAI-compatible).
Maximum number of tokens to generate.
x > 0Sampling temperature between 0 and 2.
0 <= x <= 2Nucleus sampling parameter.
0 <= x <= 1Anthropic beta parameter for Claude Fable 5 server-side refusal fallback. Forwarded only for direct Anthropic routes; ignored for other providers.
10Show child attributes
Show child attributes
[{ "model": "claude-opus-4-8" }]
Show child attributes
Show child attributes
A list of tools the model may call.
- Function Tool
- Web Search Tool
- X Search Tool
- Code Interpreter Tool
- File Search Tool
- Computer Use Tool
- Generic Tool
Show child attributes
Show child attributes
Controls which tool is called by the model.
auto Enable web search for this request.
Whether to stream back partial progress.
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"
Show child attributes
Show child attributes
Response
Successful response
Response from the Responses API endpoint.
Unique identifier for the response.
"resp_abc123"
The object type.
response Unix timestamp of when the response was created.
The model used for the response.
The status of the response.
completed, failed, in_progress, cancelled, incomplete The output items generated by the model.
- Reasoning Output
- Message Output
- Function Call Output
- Web Search Call Output
Show child attributes
Show child attributes
Why generation ended before completion; partial output and usage are retained.
Show child attributes
Show child attributes
Token usage statistics.
Show child attributes
Show child attributes
Error information if the response failed.
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>",
"include": [
"<string>"
],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [
{
"model": "claude-opus-4-8"
}
],
"reasoning": {
"enabled": true
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": "auto",
"web_search": true,
"stream": true,
"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>",
"include": ["<string>"],
"max_output_tokens": 1,
"temperature": 1,
"top_p": 0.5,
"fallbacks": [{ "model": "claude-opus-4-8" }],
"reasoning": { "enabled": True },
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
}
],
"tool_choice": "auto",
"web_search": True,
"stream": True,
"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>',
include: ['<string>'],
max_output_tokens: 1,
temperature: 1,
top_p: 0.5,
fallbacks: [{model: 'claude-opus-4-8'}],
reasoning: {enabled: true},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}, strict: true}
}
],
tool_choice: 'auto',
web_search: true,
stream: true,
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>',
'include' => [
'<string>'
],
'max_output_tokens' => 1,
'temperature' => 1,
'top_p' => 0.5,
'fallbacks' => [
[
'model' => 'claude-opus-4-8'
]
],
'reasoning' => [
'enabled' => true
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
]
],
'tool_choice' => 'auto',
'web_search' => true,
'stream' => true,
'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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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 \"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 \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"web_search\": true,\n \"stream\": true,\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": "<string>"
}{
"error": "<string>"
}