Run text inference based on the supplied parameters. Long running requests should use the streaming API by setting stream=true in your request.
curl --request POST \
--url https://api.venice.ai/api/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"frequency_penalty": 0,
"logprobs": true,
"top_logprobs": 1,
"max_completion_tokens": 123,
"max_temp": 1.5,
"max_tokens": 123,
"messages": [
{
"content": "<string>",
"role": "user"
}
],
"min_p": 0.05,
"min_temp": 0.1,
"model": "venice-uncensored",
"n": 1,
"presence_penalty": 0,
"repetition_penalty": 1.2,
"seed": 42,
"stop": "<string>",
"stop_token_ids": [
151643,
151645
],
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"top_k": 40,
"top_p": 0.9,
"user": "<string>",
"venice_parameters": {
"character_slug": "venice",
"strip_thinking_response": false,
"disable_thinking": false,
"enable_web_search": "auto",
"enable_web_citations": true,
"include_search_results_in_stream": true,
"include_venice_system_prompt": true
},
"parallel_tool_calls": false,
"response_format": {
"json_schema": {
"properties": {
"age": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"age"
],
"type": "object"
},
"type": "json_schema"
},
"tool_choice": {
"function": {
"name": "<string>"
},
"type": "<string>"
},
"tools": [
{
"function": {
"description": "<string>",
"name": "<string>",
"parameters": {}
},
"id": "<string>",
"type": "<string>"
}
]
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "The sky appears blue because of the way Earth's atmosphere scatters sunlight. When sunlight reaches Earth's atmosphere, it is made up of various colors of the spectrum, but blue light waves are shorter and scatter more easily when they hit the gases and particles in the atmosphere. This scattering occurs in all directions, but from our perspective on the ground, it appears as a blue hue that dominates the sky's color. This phenomenon is known as Rayleigh scattering. During sunrise and sunset, the sunlight has to travel further through the atmosphere, which allows more time for the blue light to scatter away from our direct line of sight, leaving the longer wavelengths, such as red, yellow, and orange, to dominate the sky's color.",
"reasoning_content": null,
"role": "assistant",
"tool_calls": []
},
"stop_reason": null
}
],
"created": 1739928524,
"id": "chatcmpl-a81fbc2d81a7a083bb83ccf9f44c6e5e",
"model": "qwen-2.5-vl",
"object": "chat.completion",
"prompt_logprobs": null,
"usage": {
"completion_tokens": 146,
"prompt_tokens": 612,
"prompt_tokens_details": null,
"total_tokens": 758
},
"venice_parameters": {
"include_venice_system_prompt": true,
"include_search_results_in_stream": false,
"web_search_citations": [],
"enable_web_search": "auto",
"enable_web_citations": true,
"strip_thinking_response": true,
"disable_thinking": true,
"character_slug": "venice"
}
}
For additional examples, please see this Postman Collection.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Supported compression encodings (gzip, br). Only applied when stream is false.
"gzip, br"
OK
The response is of type object
.
curl --request POST \
--url https://api.venice.ai/api/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"frequency_penalty": 0,
"logprobs": true,
"top_logprobs": 1,
"max_completion_tokens": 123,
"max_temp": 1.5,
"max_tokens": 123,
"messages": [
{
"content": "<string>",
"role": "user"
}
],
"min_p": 0.05,
"min_temp": 0.1,
"model": "venice-uncensored",
"n": 1,
"presence_penalty": 0,
"repetition_penalty": 1.2,
"seed": 42,
"stop": "<string>",
"stop_token_ids": [
151643,
151645
],
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"top_k": 40,
"top_p": 0.9,
"user": "<string>",
"venice_parameters": {
"character_slug": "venice",
"strip_thinking_response": false,
"disable_thinking": false,
"enable_web_search": "auto",
"enable_web_citations": true,
"include_search_results_in_stream": true,
"include_venice_system_prompt": true
},
"parallel_tool_calls": false,
"response_format": {
"json_schema": {
"properties": {
"age": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"age"
],
"type": "object"
},
"type": "json_schema"
},
"tool_choice": {
"function": {
"name": "<string>"
},
"type": "<string>"
},
"tools": [
{
"function": {
"description": "<string>",
"name": "<string>",
"parameters": {}
},
"id": "<string>",
"type": "<string>"
}
]
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "The sky appears blue because of the way Earth's atmosphere scatters sunlight. When sunlight reaches Earth's atmosphere, it is made up of various colors of the spectrum, but blue light waves are shorter and scatter more easily when they hit the gases and particles in the atmosphere. This scattering occurs in all directions, but from our perspective on the ground, it appears as a blue hue that dominates the sky's color. This phenomenon is known as Rayleigh scattering. During sunrise and sunset, the sunlight has to travel further through the atmosphere, which allows more time for the blue light to scatter away from our direct line of sight, leaving the longer wavelengths, such as red, yellow, and orange, to dominate the sky's color.",
"reasoning_content": null,
"role": "assistant",
"tool_calls": []
},
"stop_reason": null
}
],
"created": 1739928524,
"id": "chatcmpl-a81fbc2d81a7a083bb83ccf9f44c6e5e",
"model": "qwen-2.5-vl",
"object": "chat.completion",
"prompt_logprobs": null,
"usage": {
"completion_tokens": 146,
"prompt_tokens": 612,
"prompt_tokens_details": null,
"total_tokens": 758
},
"venice_parameters": {
"include_venice_system_prompt": true,
"include_search_results_in_stream": false,
"web_search_citations": [],
"enable_web_search": "auto",
"enable_web_citations": true,
"strip_thinking_response": true,
"disable_thinking": true,
"character_slug": "venice"
}
}
Run text inference based on the supplied parameters. Long running requests should use the streaming API by setting stream=true in your request.
curl --request POST \
--url https://api.venice.ai/api/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"frequency_penalty": 0,
"logprobs": true,
"top_logprobs": 1,
"max_completion_tokens": 123,
"max_temp": 1.5,
"max_tokens": 123,
"messages": [
{
"content": "<string>",
"role": "user"
}
],
"min_p": 0.05,
"min_temp": 0.1,
"model": "venice-uncensored",
"n": 1,
"presence_penalty": 0,
"repetition_penalty": 1.2,
"seed": 42,
"stop": "<string>",
"stop_token_ids": [
151643,
151645
],
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"top_k": 40,
"top_p": 0.9,
"user": "<string>",
"venice_parameters": {
"character_slug": "venice",
"strip_thinking_response": false,
"disable_thinking": false,
"enable_web_search": "auto",
"enable_web_citations": true,
"include_search_results_in_stream": true,
"include_venice_system_prompt": true
},
"parallel_tool_calls": false,
"response_format": {
"json_schema": {
"properties": {
"age": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"age"
],
"type": "object"
},
"type": "json_schema"
},
"tool_choice": {
"function": {
"name": "<string>"
},
"type": "<string>"
},
"tools": [
{
"function": {
"description": "<string>",
"name": "<string>",
"parameters": {}
},
"id": "<string>",
"type": "<string>"
}
]
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "The sky appears blue because of the way Earth's atmosphere scatters sunlight. When sunlight reaches Earth's atmosphere, it is made up of various colors of the spectrum, but blue light waves are shorter and scatter more easily when they hit the gases and particles in the atmosphere. This scattering occurs in all directions, but from our perspective on the ground, it appears as a blue hue that dominates the sky's color. This phenomenon is known as Rayleigh scattering. During sunrise and sunset, the sunlight has to travel further through the atmosphere, which allows more time for the blue light to scatter away from our direct line of sight, leaving the longer wavelengths, such as red, yellow, and orange, to dominate the sky's color.",
"reasoning_content": null,
"role": "assistant",
"tool_calls": []
},
"stop_reason": null
}
],
"created": 1739928524,
"id": "chatcmpl-a81fbc2d81a7a083bb83ccf9f44c6e5e",
"model": "qwen-2.5-vl",
"object": "chat.completion",
"prompt_logprobs": null,
"usage": {
"completion_tokens": 146,
"prompt_tokens": 612,
"prompt_tokens_details": null,
"total_tokens": 758
},
"venice_parameters": {
"include_venice_system_prompt": true,
"include_search_results_in_stream": false,
"web_search_citations": [],
"enable_web_search": "auto",
"enable_web_citations": true,
"strip_thinking_response": true,
"disable_thinking": true,
"character_slug": "venice"
}
}
For additional examples, please see this Postman Collection.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Supported compression encodings (gzip, br). Only applied when stream is false.
"gzip, br"
OK
The response is of type object
.
curl --request POST \
--url https://api.venice.ai/api/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"frequency_penalty": 0,
"logprobs": true,
"top_logprobs": 1,
"max_completion_tokens": 123,
"max_temp": 1.5,
"max_tokens": 123,
"messages": [
{
"content": "<string>",
"role": "user"
}
],
"min_p": 0.05,
"min_temp": 0.1,
"model": "venice-uncensored",
"n": 1,
"presence_penalty": 0,
"repetition_penalty": 1.2,
"seed": 42,
"stop": "<string>",
"stop_token_ids": [
151643,
151645
],
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"top_k": 40,
"top_p": 0.9,
"user": "<string>",
"venice_parameters": {
"character_slug": "venice",
"strip_thinking_response": false,
"disable_thinking": false,
"enable_web_search": "auto",
"enable_web_citations": true,
"include_search_results_in_stream": true,
"include_venice_system_prompt": true
},
"parallel_tool_calls": false,
"response_format": {
"json_schema": {
"properties": {
"age": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"age"
],
"type": "object"
},
"type": "json_schema"
},
"tool_choice": {
"function": {
"name": "<string>"
},
"type": "<string>"
},
"tools": [
{
"function": {
"description": "<string>",
"name": "<string>",
"parameters": {}
},
"id": "<string>",
"type": "<string>"
}
]
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "The sky appears blue because of the way Earth's atmosphere scatters sunlight. When sunlight reaches Earth's atmosphere, it is made up of various colors of the spectrum, but blue light waves are shorter and scatter more easily when they hit the gases and particles in the atmosphere. This scattering occurs in all directions, but from our perspective on the ground, it appears as a blue hue that dominates the sky's color. This phenomenon is known as Rayleigh scattering. During sunrise and sunset, the sunlight has to travel further through the atmosphere, which allows more time for the blue light to scatter away from our direct line of sight, leaving the longer wavelengths, such as red, yellow, and orange, to dominate the sky's color.",
"reasoning_content": null,
"role": "assistant",
"tool_calls": []
},
"stop_reason": null
}
],
"created": 1739928524,
"id": "chatcmpl-a81fbc2d81a7a083bb83ccf9f44c6e5e",
"model": "qwen-2.5-vl",
"object": "chat.completion",
"prompt_logprobs": null,
"usage": {
"completion_tokens": 146,
"prompt_tokens": 612,
"prompt_tokens_details": null,
"total_tokens": 758
},
"venice_parameters": {
"include_venice_system_prompt": true,
"include_search_results_in_stream": false,
"web_search_citations": [],
"enable_web_search": "auto",
"enable_web_citations": true,
"strip_thinking_response": true,
"disable_thinking": true,
"character_slug": "venice"
}
}