Skip to main content
POST
/
v1
/
responses
Create Response
curl --request POST \
  --url https://www.anyfast.ai/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-5.6-terra",
  "input": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "stream": false,
  "temperature": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "max_output_tokens": 17,
  "stop": "<string>",
  "n": 1,
  "text": {
    "format": {}
  },
  "reasoning": {
    "mode": "pro"
  },
  "tools": [
    {}
  ],
  "prompt_cache_options": {},
  "tool_choice": "<string>",
  "store": true,
  "safety_identifier": "<string>",
  "user": "<string>"
}
'
import requests

url = "https://www.anyfast.ai/v1/responses"

payload = {
    "model": "gpt-5.6-terra",
    "input": [
        {
            "role": "user",
            "content": "Hello!"
        }
    ],
    "stream": False,
    "temperature": 1,
    "frequency_penalty": 0,
    "presence_penalty": 0,
    "max_output_tokens": 17,
    "stop": "<string>",
    "n": 1,
    "text": { "format": {} },
    "reasoning": { "mode": "pro" },
    "tools": [{}],
    "prompt_cache_options": {},
    "tool_choice": "<string>",
    "store": True,
    "safety_identifier": "<string>",
    "user": "<string>"
}
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-5.6-terra',
    input: [{role: 'user', content: 'Hello!'}],
    stream: false,
    temperature: 1,
    frequency_penalty: 0,
    presence_penalty: 0,
    max_output_tokens: 17,
    stop: '<string>',
    n: 1,
    text: {format: {}},
    reasoning: {mode: 'pro'},
    tools: [{}],
    prompt_cache_options: {},
    tool_choice: '<string>',
    store: true,
    safety_identifier: '<string>',
    user: '<string>'
  })
};

fetch('https://www.anyfast.ai/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://www.anyfast.ai/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-5.6-terra',
    'input' => [
        [
                'role' => 'user',
                'content' => 'Hello!'
        ]
    ],
    'stream' => false,
    'temperature' => 1,
    'frequency_penalty' => 0,
    'presence_penalty' => 0,
    'max_output_tokens' => 17,
    'stop' => '<string>',
    'n' => 1,
    'text' => [
        'format' => [
                
        ]
    ],
    'reasoning' => [
        'mode' => 'pro'
    ],
    'tools' => [
        [
                
        ]
    ],
    'prompt_cache_options' => [
        
    ],
    'tool_choice' => '<string>',
    'store' => true,
    'safety_identifier' => '<string>',
    'user' => '<string>'
  ]),
  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://www.anyfast.ai/v1/responses"

	payload := strings.NewReader("{\n  \"model\": \"gpt-5.6-terra\",\n  \"input\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"stream\": false,\n  \"temperature\": 1,\n  \"frequency_penalty\": 0,\n  \"presence_penalty\": 0,\n  \"max_output_tokens\": 17,\n  \"stop\": \"<string>\",\n  \"n\": 1,\n  \"text\": {\n    \"format\": {}\n  },\n  \"reasoning\": {\n    \"mode\": \"pro\"\n  },\n  \"tools\": [\n    {}\n  ],\n  \"prompt_cache_options\": {},\n  \"tool_choice\": \"<string>\",\n  \"store\": true,\n  \"safety_identifier\": \"<string>\",\n  \"user\": \"<string>\"\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://www.anyfast.ai/v1/responses")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"gpt-5.6-terra\",\n  \"input\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"stream\": false,\n  \"temperature\": 1,\n  \"frequency_penalty\": 0,\n  \"presence_penalty\": 0,\n  \"max_output_tokens\": 17,\n  \"stop\": \"<string>\",\n  \"n\": 1,\n  \"text\": {\n    \"format\": {}\n  },\n  \"reasoning\": {\n    \"mode\": \"pro\"\n  },\n  \"tools\": [\n    {}\n  ],\n  \"prompt_cache_options\": {},\n  \"tool_choice\": \"<string>\",\n  \"store\": true,\n  \"safety_identifier\": \"<string>\",\n  \"user\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://www.anyfast.ai/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-5.6-terra\",\n  \"input\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"stream\": false,\n  \"temperature\": 1,\n  \"frequency_penalty\": 0,\n  \"presence_penalty\": 0,\n  \"max_output_tokens\": 17,\n  \"stop\": \"<string>\",\n  \"n\": 1,\n  \"text\": {\n    \"format\": {}\n  },\n  \"reasoning\": {\n    \"mode\": \"pro\"\n  },\n  \"tools\": [\n    {}\n  ],\n  \"prompt_cache_options\": {},\n  \"tool_choice\": \"<string>\",\n  \"store\": true,\n  \"safety_identifier\": \"<string>\",\n  \"user\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244",
  "object": "response",
  "created_at": 1773132155,
  "model": "gpt-5.6-terra",
  "status": "completed",
  "output": [
    {
      "id": "msg_0ed94fe7ec73cf56",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "Hi! How can I help you today?",
          "annotations": [
            {}
          ]
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 8,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 15,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 23
  },
  "completed_at": 1773132156,
  "reasoning": {
    "effort": "high",
    "summary": "detailed"
  },
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  }
}
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID for the balanced GPT-5.6 Terra tier.

Available options:
gpt-5.6-terra
Example:

"gpt-5.6-terra"

input
object[]
required

Text or image input for the model to generate a response.

Minimum array length: 1
Example:
[{ "role": "user", "content": "Hello!" }]
stream
boolean
default:false

If true, stream partial response deltas using SSE.

temperature
number
default:1

Sampling temperature. Higher values make output more random.

Required range: 0 <= x <= 2
Example:

1

frequency_penalty
number
default:0

Penalizes repeated tokens based on their frequency in the text so far.

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Penalizes tokens that have already appeared in the text.

Required range: -2 <= x <= 2
max_output_tokens
integer

The maximum number of output tokens to generate.

Required range: x >= 16
stop
string

Sequences where the model will stop generating further tokens.

n
integer
default:1

How many response choices to generate.

Required range: x >= 1
text
object

Configuration options for model text response.

reasoning
object

Configuration for model reasoning / thinking.

tools
object[]

A list of tools the model may call.

prompt_cache_options
object

Options for explicit prompt caching when supported.

tool_choice
string

Controls which (if any) tool is called by the model.

store
boolean
default:true

Whether to store the generated model response for later retrieval via API.

safety_identifier
string

Stable privacy-preserving identifier for the end user, used by safety systems.

user
string

A unique identifier representing your end-user.

Response

Response generated successfully

id
string
required
Example:

"resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244"

object
string
required
Example:

"response"

created_at
integer
required

Unix timestamp when the response was created.

Example:

1773132155

model
string
required
Example:

"gpt-5.6-terra"

status
enum<string>
required
Available options:
completed,
failed,
in_progress,
incomplete
Example:

"completed"

output
object[]
required
usage
object
required
completed_at
integer

Unix timestamp when the response was completed.

Example:

1773132156

reasoning
object
text
object