curl --request POST \
--url https://api.ai.cc/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-4",
"input": "Tell me a three sentence bedtime story about a unicorn."
}
'import requests
url = "https://api.ai.cc/v1/responses"
payload = {
"model": "gpt-4",
"input": "Tell me a three sentence bedtime story about a unicorn."
}
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: 'gpt-4',
input: 'Tell me a three sentence bedtime story about a unicorn.'
})
};
fetch('https://api.ai.cc/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.ai.cc/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' => 'gpt-4',
'input' => 'Tell me a three sentence bedtime story about a unicorn.'
]),
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.ai.cc/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\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.ai.cc/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai.cc/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\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123
},
"completion_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123
}
}
}OpenAI Responses Format
The OpenAI Responses API is used to create model responses. It supports multi-turn dialogue, tool calls, inference, and other functionalities.
curl --request POST \
--url https://api.ai.cc/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-4",
"input": "Tell me a three sentence bedtime story about a unicorn."
}
'import requests
url = "https://api.ai.cc/v1/responses"
payload = {
"model": "gpt-4",
"input": "Tell me a three sentence bedtime story about a unicorn."
}
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: 'gpt-4',
input: 'Tell me a three sentence bedtime story about a unicorn.'
})
};
fetch('https://api.ai.cc/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.ai.cc/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' => 'gpt-4',
'input' => 'Tell me a three sentence bedtime story about a unicorn.'
]),
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.ai.cc/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\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.ai.cc/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai.cc/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\": \"gpt-4\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123
},
"completion_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123
}
}
}Authorizations
Authentication is done using Bearer Token.
Format: Authorization: Bearer sk-xxxxxx
Body
Model ID used to generate the response
input: string or array
A system (or developer) message inserted into the model's context.
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
What sampling temperature to use, between 0 and 2.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
If set to true, the model response data will be streamed to the client as it is generated using server-sent events.
Show child attributes
Show child attributes
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
auto, disabled 
