curl --request POST \
--url https://api.impossibl.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "anthropic/claude-sonnet-4-5",
"input": "<string>",
"instructions": "<string>",
"stream": false,
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"reasoning": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
]
}
'import requests
url = "https://api.impossibl.com/v1/responses"
payload = {
"model": "anthropic/claude-sonnet-4-5",
"input": "<string>",
"instructions": "<string>",
"stream": False,
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"reasoning": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": 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: 'anthropic/claude-sonnet-4-5',
input: '<string>',
instructions: '<string>',
stream: false,
temperature: 123,
top_p: 123,
max_output_tokens: 123,
reasoning: {},
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
]
})
};
fetch('https://api.impossibl.com/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.impossibl.com/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' => 'anthropic/claude-sonnet-4-5',
'input' => '<string>',
'instructions' => '<string>',
'stream' => false,
'temperature' => 123,
'top_p' => 123,
'max_output_tokens' => 123,
'reasoning' => [
],
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => 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.impossibl.com/v1/responses"
payload := strings.NewReader("{\n \"model\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\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.impossibl.com/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.impossibl.com/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\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_...",
"object": "response",
"created_at": 123,
"status": "in_progress",
"incomplete_details": {
"reason": "max_output_tokens"
},
"model": "<string>",
"output_text": "<string>",
"output": [
{
"type": "message",
"id": "<string>",
"status": "<string>",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{}
]
}
],
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
}
}{
"error": {
"message": "`model` and `messages` are required",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient credits. Top up to continue.",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Unknown model: foo/bar",
"type": "invalid_request_error"
}
}{
"error": {
"message": "permission-denied: ...",
"type": "upstream_error"
}
}{
"error": {
"message": "Provider not configured: missing OPENAI_API_KEY",
"type": "provider_not_configured"
}
}Create a response (OpenAI Responses API)
Implements OpenAI’s Responses API for text. Set stream: true for semantic-event SSE.
curl --request POST \
--url https://api.impossibl.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "anthropic/claude-sonnet-4-5",
"input": "<string>",
"instructions": "<string>",
"stream": false,
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"reasoning": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
]
}
'import requests
url = "https://api.impossibl.com/v1/responses"
payload = {
"model": "anthropic/claude-sonnet-4-5",
"input": "<string>",
"instructions": "<string>",
"stream": False,
"temperature": 123,
"top_p": 123,
"max_output_tokens": 123,
"reasoning": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": 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: 'anthropic/claude-sonnet-4-5',
input: '<string>',
instructions: '<string>',
stream: false,
temperature: 123,
top_p: 123,
max_output_tokens: 123,
reasoning: {},
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
]
})
};
fetch('https://api.impossibl.com/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.impossibl.com/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' => 'anthropic/claude-sonnet-4-5',
'input' => '<string>',
'instructions' => '<string>',
'stream' => false,
'temperature' => 123,
'top_p' => 123,
'max_output_tokens' => 123,
'reasoning' => [
],
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => 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.impossibl.com/v1/responses"
payload := strings.NewReader("{\n \"model\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\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.impossibl.com/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.impossibl.com/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\": \"anthropic/claude-sonnet-4-5\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"stream\": false,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_output_tokens\": 123,\n \"reasoning\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_...",
"object": "response",
"created_at": 123,
"status": "in_progress",
"incomplete_details": {
"reason": "max_output_tokens"
},
"model": "<string>",
"output_text": "<string>",
"output": [
{
"type": "message",
"id": "<string>",
"status": "<string>",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{}
]
}
],
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
}
}{
"error": {
"message": "`model` and `messages` are required",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient credits. Top up to continue.",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Unknown model: foo/bar",
"type": "invalid_request_error"
}
}{
"error": {
"message": "permission-denied: ...",
"type": "upstream_error"
}
}{
"error": {
"message": "Provider not configured: missing OPENAI_API_KEY",
"type": "provider_not_configured"
}
}Authorizations
Gateway API key (imp-rt-...) from POST /v1/accounts or /v1/keys.
Body
"anthropic/claude-sonnet-4-5"
Stateless reasoning control. summary and stateful response chaining are not supported.
Show child attributes
Show child attributes
Function tools the model may call (relay mode). Function fields are flattened onto the tool.
Show child attributes
Show child attributes
auto, none, required, or { type: function, name }.
auto, none, required Request-level breakpoint; same contract as on ChatCompletionRequest. A per-part cache_control anywhere takes precedence and this is ignored.
Show child attributes
Show child attributes
Response
A response object. When stream: true, the body is instead an SSE
stream of response.* semantic events ending with response.completed,
or response.incomplete when generation stopped short (see status).
Responses API object (response).
"resp_..."
"response"in_progress, completed, incomplete, failed Why generation stopped short. Present only when status is incomplete.
Show child attributes
Show child attributes
Convenience aggregation of the assistant text.
Output items — assistant message items and, on tool calls, function_call items.
Show child attributes
Show child attributes
Show child attributes
Show child attributes

