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>"
}
}Créer une complétion de conversation
Endpoint Chat Completions compatible OpenAI. Les appels en mode non streaming sont privilégiés actuellement.
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>"
}
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corps
"gpt-5.4"
Show child attributes
Show child attributes
Température d'échantillonnage.
0 <= x <= 2Masse de probabilité cumulée pour l'échantillonnage nucleus.
0 <= x <= 1Alias de compatibilité obsolète de max_completion_tokens. Kimi K3 accepte les deux formes et utilise max_completion_tokens.
x >= 1Nombre maximal de tokens de raisonnement et de réponse finale cumulés. Les limites dépendent du modèle ; un budget épuisé peut laisser la réponse incomplète. Kimi K3: 131072 (default), 1048576 (max).
1 <= x <= 1048576Intensité du raisonnement. Cette liste indique les valeurs syntaxiquement valides, sans garantir leur prise en charge par tous les modèles. Les valeurs non prises en charge renvoient 400. Kimi K3 accepte low, high et max (par défaut max) ; GPT-5.4/5.5 acceptent none, low, medium, high, xhigh. Limites Claude et Gemini : /fr/models/chat-models. En l’absence de valeur, le comportement par défaut du modèle est conservé. Les valeurs acceptées, la valeur par défaut et la possibilité de désactiver le raisonnement sont publiées dans GET /v1/models sous capability_metadata.reasoning.
none, minimal, low, medium, high, xhigh, max Jusqu'à 4 séquences d'arrêt.
Nombre de complétions à générer.
x >= 1-2 <= x <= 2-2 <= x <= 2Graine d'échantillonnage déterministe au mieux.
Force une sortie au format objet JSON ou JSON Schema, par ex. { "type": "json_object" }.
Déclarations d'outils/fonctions que le modèle peut appeler.
Sélection d'outil : 'auto' | 'none' | 'required' | { type: 'function', function: { name } }.
0 <= x <= 20Identifiant de l'utilisateur final, pour la surveillance des abus.
Si true, les deltas partiels sont diffusés via des server-sent events (OpenAI chat.completion.chunk), terminés par 'data: [DONE]'.
Alias de compatibilité de reasoning_effort. Si les deux formes sont présentes, leurs valeurs doivent être identiques ; sinon, la requête renvoie 400.
Show child attributes
Show child attributes