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>"
}
}Crear una compleción de conversación
Endpoint de Chat Completions compatible con OpenAI. Actualmente se utiliza principalmente con llamadas sin streaming.
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>"
}
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cuerpo
"gpt-5.4"
Show child attributes
Show child attributes
Temperatura de muestreo.
0 <= x <= 2Masa de probabilidad acumulada del muestreo por núcleo (nucleus).
0 <= x <= 1Alias de compatibilidad obsoleto de max_completion_tokens. Kimi K3 acepta ambas formas y utiliza max_completion_tokens.
x >= 1Máximo de tokens de razonamiento y respuesta final combinados. Se aplican límites por modelo; agotar el presupuesto puede dejar la respuesta incompleta. Kimi K3: 131072 (default), 1048576 (max).
1 <= x <= 1048576Intensidad del razonamiento. La enumeración indica valores sintácticamente válidos, no compatibilidad con todos los modelos. Los valores no admitidos devuelven 400. Kimi K3 admite low, high y max (por defecto max); GPT-5.4/5.5 admiten none, low, medium, high, xhigh. Límites de Claude y Gemini: /es/models/chat-models. Si se omite, se mantiene el comportamiento predeterminado del modelo. Los niveles aceptados, el valor predeterminado y si el razonamiento se puede desactivar se publican en GET /v1/models dentro de capability_metadata.reasoning.
none, minimal, low, medium, high, xhigh, max Hasta 4 secuencias de parada.
Número de candidatos a generar.
x >= 1-2 <= x <= 2-2 <= x <= 2Semilla de muestreo lo más reproducible posible.
Fuerza la salida como objeto JSON o JSON Schema, p. ej. { "type": "json_object" }.
Declaraciones de herramientas/funciones que el modelo puede invocar.
Selección de herramienta: 'auto' | 'none' | 'required' | { type: 'function', function: { name } }.
0 <= x <= 20Identificador del usuario final, para auditoría de riesgos.
Cuando es true, los incrementos se devuelven en streaming mediante SSE (OpenAI chat.completion.chunk) y terminan con 'data: [DONE]'.
Alias de compatibilidad de reasoning_effort. Si se indican ambas formas, los valores deben coincidir; los conflictos devuelven 400.
Show child attributes
Show child attributes