curl --request POST \
--url https://apiany.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Write a concise product tagline for APIAny.AI."
}
],
"temperature": 0.7
}
'import requests
url = "https://apiany.ai/v1/chat/completions"
payload = {
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Write a concise product tagline for APIAny.AI."
}
],
"temperature": 0.7
}
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.4',
messages: [{role: 'user', content: 'Write a concise product tagline for APIAny.AI.'}],
temperature: 0.7
})
};
fetch('https://apiany.ai/v1/chat/completions', 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://apiany.ai/v1/chat/completions",
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.4',
'messages' => [
[
'role' => 'user',
'content' => 'Write a concise product tagline for APIAny.AI.'
]
],
'temperature' => 0.7
]),
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://apiany.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\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://apiany.ai/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiany.ai/v1/chat/completions")
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.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}チャット補完を作成
OpenAI 互換の Chat Completions エンドポイント。現在は非ストリーミング呼び出しが中心です。
curl --request POST \
--url https://apiany.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Write a concise product tagline for APIAny.AI."
}
],
"temperature": 0.7
}
'import requests
url = "https://apiany.ai/v1/chat/completions"
payload = {
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Write a concise product tagline for APIAny.AI."
}
],
"temperature": 0.7
}
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.4',
messages: [{role: 'user', content: 'Write a concise product tagline for APIAny.AI.'}],
temperature: 0.7
})
};
fetch('https://apiany.ai/v1/chat/completions', 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://apiany.ai/v1/chat/completions",
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.4',
'messages' => [
[
'role' => 'user',
'content' => 'Write a concise product tagline for APIAny.AI.'
]
],
'temperature' => 0.7
]),
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://apiany.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\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://apiany.ai/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiany.ai/v1/chat/completions")
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.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Write a concise product tagline for APIAny.AI.\"\n }\n ],\n \"temperature\": 0.7\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
"gpt-5.4"
Show child attributes
Show child attributes
サンプリング温度。
0 <= x <= 2核サンプリングの累積確率。
0 <= x <= 1max_completion_tokens の非推奨互換エイリアス。Kimi K3 は両方の形式を受け付け、max_completion_tokens を使用します。
x >= 1推論と最終回答を合わせた最大トークン数。上限はモデルごとに異なり、予算を使い切ると回答が不完全になる場合があります。 Kimi K3: 131072 (default), 1048576 (max).
1 <= x <= 1048576推論強度。この列挙は構文上の許容値であり、全モデルでの対応を保証しません。非対応の値は 400 になります。Kimi K3 は low、high、max(既定は max)に対応し、GPT-5.4/5.5 は none、low、medium、high、xhigh に対応します。Claude と Gemini の制限は /ja/models/chat-models を参照。省略時はモデルの既定動作を維持します。モデルごとの対応値・既定値・無効化可否は GET /v1/models の capability_metadata.reasoning で公開されています。
none, minimal, low, medium, high, xhigh, max 最大 4 個の停止シーケンス。
生成する候補数。
x >= 1-2 <= x <= 2-2 <= x <= 2できる限り再現可能なサンプリングシード。
JSON オブジェクトまたは JSON Schema 出力を強制します(例: { "type": "json_object" })。
モデルが呼び出せるツール/関数の宣言。
ツール選択: 'auto' | 'none' | 'required' | { type: 'function', function: { name } }。
0 <= x <= 20リスク監査のためのエンドユーザー識別子。
true の場合、増分を SSE でストリーミング返却します(OpenAI chat.completion.chunk)。'data: [DONE]' で終了します。
reasoning_effort の互換エイリアス。両方の形式を指定する場合、値を一致させてください。不一致は 400 になります。
Show child attributes
Show child attributes