curl --request POST \
--url https://api.bytez.com/models/v2/openai/v1/responses \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"max_output_tokens": 256,
"temperature": 0.7,
"stream": false,
"reasoning": {
"effort": "medium",
"summary": "none"
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"metadata": {},
"user": "<string>",
"include": [
"<string>"
],
"top_logprobs": 123
}
'import requests
url = "https://api.bytez.com/models/v2/openai/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"max_output_tokens": 256,
"temperature": 0.7,
"stream": False,
"reasoning": {
"effort": "medium",
"summary": "none"
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"metadata": {},
"user": "<string>",
"include": ["<string>"],
"top_logprobs": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
max_output_tokens: 256,
temperature: 0.7,
stream: false,
reasoning: {effort: 'medium', summary: 'none'},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}}
}
],
metadata: {},
user: '<string>',
include: ['<string>'],
top_logprobs: 123
})
};
fetch('https://api.bytez.com/models/v2/openai/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.bytez.com/models/v2/openai/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' => '<string>',
'input' => '<string>',
'max_output_tokens' => 256,
'temperature' => 0.7,
'stream' => false,
'reasoning' => [
'effort' => 'medium',
'summary' => 'none'
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
]
]
]
],
'metadata' => [
],
'user' => '<string>',
'include' => [
'<string>'
],
'top_logprobs' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.bytez.com/models/v2/openai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.bytez.com/models/v2/openai/v1/responses")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bytez.com/models/v2/openai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"output": [
{
"type": "message",
"role": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>"
}
]
}
],
"output_text": "<string>",
"usage": {}
}Responses
Sends input to an OpenAI compatible Responses model and returns a unified response object. Supports text and chat-style input, streaming, tools, and (for supported reasoning models) “thinking” via the reasoning object. To send a request to a closed source provider, prefix your model with their provider name, e.g. openai/gpt-5.1.
curl --request POST \
--url https://api.bytez.com/models/v2/openai/v1/responses \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"max_output_tokens": 256,
"temperature": 0.7,
"stream": false,
"reasoning": {
"effort": "medium",
"summary": "none"
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"metadata": {},
"user": "<string>",
"include": [
"<string>"
],
"top_logprobs": 123
}
'import requests
url = "https://api.bytez.com/models/v2/openai/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"max_output_tokens": 256,
"temperature": 0.7,
"stream": False,
"reasoning": {
"effort": "medium",
"summary": "none"
},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"metadata": {},
"user": "<string>",
"include": ["<string>"],
"top_logprobs": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
max_output_tokens: 256,
temperature: 0.7,
stream: false,
reasoning: {effort: 'medium', summary: 'none'},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}}
}
],
metadata: {},
user: '<string>',
include: ['<string>'],
top_logprobs: 123
})
};
fetch('https://api.bytez.com/models/v2/openai/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.bytez.com/models/v2/openai/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' => '<string>',
'input' => '<string>',
'max_output_tokens' => 256,
'temperature' => 0.7,
'stream' => false,
'reasoning' => [
'effort' => 'medium',
'summary' => 'none'
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
]
]
]
],
'metadata' => [
],
'user' => '<string>',
'include' => [
'<string>'
],
'top_logprobs' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.bytez.com/models/v2/openai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.bytez.com/models/v2/openai/v1/responses")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bytez.com/models/v2/openai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"max_output_tokens\": 256,\n \"temperature\": 0.7,\n \"stream\": false,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": \"none\"\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"metadata\": {},\n \"user\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"top_logprobs\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"output": [
{
"type": "message",
"role": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>"
}
]
}
],
"output_text": "<string>",
"usage": {}
}Headers
Token for authentication
Body
The ID of the model to run (e.g., anthropic/claude-opus-4-5, openai/gpt-5.1)
The input to the model. Can be a string (simple prompt) or an array of chat-style messages. For richer multimodal inputs, use the array form with multi-part content.
Maximum number of tokens to generate (counts reasoning + visible output for reasoning models)
Sampling temperature
Whether to stream SSE events
Optional "thinking" controls for supported reasoning models.
Show child attributes
Show child attributes
Optional tool definitions for function/tool calling
Show child attributes
Show child attributes
Tool selection behavior
auto, none, required Arbitrary key/value metadata to attach to the request
End-user identifier (if supported)
Optional list of extra fields to include in the response (e.g. logprobs). Example values may include message.output_text.logprobs (provider/model dependent).
Number of most likely tokens to return at each position (if logprobs are included)
Response
Successful response
Unique ID for this response
Type of returned object (usually response)
Unix timestamp of response creation
Model used to generate the response
Output items (messages, reasoning summaries, tool calls, etc.)
- Option 1
- Option 2
Show child attributes
Show child attributes
Convenience field containing concatenated output text (when applicable)
Token usage details (shape may vary by provider)