cURL
curl https://api.routify.ru/v1/responses \
-H "Authorization: Bearer $ROUTIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"input": "Tell me a short joke."
}'from openai import OpenAI
client = OpenAI(
api_key="$ROUTIFY_API_KEY",
base_url="https://api.routify.ru/v1"
)
response = client.responses.create(
model="gpt-4.1",
input="Tell me a short joke."
)
print(response.output_text)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTIFY_API_KEY,
baseURL: "https://api.routify.ru/v1"
});
const response = await client.responses.create({
model: "gpt-4.1",
input: "Tell me a short joke."
});
console.log(response.output_text);
{
"id": "resp_03e9ec3c72006b3e...",
"object": "response",
"created_at": 1772530182,
"status": "completed",
"model": "gpt-5.1-codex-mini",
"output": [
{
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I assist you today?"
}
]
}
],
"usage": {
"input_tokens": 7,
"output_tokens": 26,
"total_tokens": 33
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routify.ru/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>',
'stream' => false
]),
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.routify.ru/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\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.routify.ru/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routify.ru/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\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"message": "model is required",
"type": "invalid_request_error"
}
}{
"error": {
"message": "invalid api key",
"type": "auth_error"
}
}{
"error": {
"message": "insufficient balance",
"type": "billing_error"
}
}{
"error": {
"message": "model not found",
"type": "invalid_request_error"
}
}{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "all providers unavailable",
"type": "provider_error"
}
}Endpoints
Responses API
POST /v1/responses — native proxy to OpenAI Responses API
POST
/
v1
/
responses
cURL
curl https://api.routify.ru/v1/responses \
-H "Authorization: Bearer $ROUTIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"input": "Tell me a short joke."
}'from openai import OpenAI
client = OpenAI(
api_key="$ROUTIFY_API_KEY",
base_url="https://api.routify.ru/v1"
)
response = client.responses.create(
model="gpt-4.1",
input="Tell me a short joke."
)
print(response.output_text)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTIFY_API_KEY,
baseURL: "https://api.routify.ru/v1"
});
const response = await client.responses.create({
model: "gpt-4.1",
input: "Tell me a short joke."
});
console.log(response.output_text);
{
"id": "resp_03e9ec3c72006b3e...",
"object": "response",
"created_at": 1772530182,
"status": "completed",
"model": "gpt-5.1-codex-mini",
"output": [
{
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I assist you today?"
}
]
}
],
"usage": {
"input_tokens": 7,
"output_tokens": 26,
"total_tokens": 33
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routify.ru/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>',
'stream' => false
]),
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.routify.ru/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\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.routify.ru/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routify.ru/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\": \"<string>\",\n \"input\": \"<string>\",\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"message": "model is required",
"type": "invalid_request_error"
}
}{
"error": {
"message": "invalid api key",
"type": "auth_error"
}
}{
"error": {
"message": "insufficient balance",
"type": "billing_error"
}
}{
"error": {
"message": "model not found",
"type": "invalid_request_error"
}
}{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "all providers unavailable",
"type": "provider_error"
}
}Full pass-through proxy to the OpenAI Responses API. The request is forwarded as-is; the response is returned unchanged.
Supports the full Responses API feature set: tools, structured output, reasoning,
previous_response_id, web search, and more.Authorizations
Bearer authentication header of the form Authorization: Bearer $ROUTIFY_API_KEY.
Body
application/json
Full OpenAI Responses API request. All fields are forwarded to the upstream provider as-is. For detailed parameter descriptions see https://developers.openai.com/api/reference/resources/responses/methods/create
Model ID used to generate the response. Use GET /v1/models to list all available models.
Text, image, or file inputs to the model, used to generate a response. Can be a string or an array of input items.
If set to true, the response is streamed using server-sent events. The stream ends with a response.completed event.
Response
Successful response (JSON or SSE stream)
The response is of type object.