curl https://api.orbit-z.shop/v1/chat/completions \
-H "Authorization: Bearer oz_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"model":"orbit-z","messages":[{"role":"user","content":"Olá"}]}'Nunca coloque uma chave secreta diretamente em JavaScript executado no navegador. Chamadas de sites devem passar pelo backend.
curl https://api.orbit-z.shop/v1/chat/completions \
-H "Authorization: Bearer oz_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"model":"orbit-z","messages":[{"role":"user","content":"Olá"}]}'<?php
$ch = curl_init('https://api.orbit-z.shop/v1/chat/completions');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer oz_live_SUA_CHAVE','Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['model'=>'orbit-z','messages'=>[['role'=>'user','content'=>'Olá']]])
]);
$response = json_decode(curl_exec($ch), true);
echo $response['choices'][0]['message']['content'];import requests
r = requests.post('https://api.orbit-z.shop/v1/chat/completions', headers={'Authorization': 'Bearer oz_live_SUA_CHAVE'}, json={'model':'orbit-z','messages':[{'role':'user','content':'Olá'}]})
r.raise_for_status()
print(r.json()['choices'][0]['message']['content'])const response = await fetch('https://api.orbit-z.shop/v1/chat/completions', {
method: 'POST',
headers: { Authorization: 'Bearer oz_live_SUA_CHAVE', 'Content-Type': 'application/json' },
body: JSON.stringify({ model: 'orbit-z', messages: [{ role: 'user', content: 'Olá' }] })
});
const data = await response.json();
console.log(data.choices[0].message.content);using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new("Bearer", "oz_live_SUA_CHAVE");
var response = await client.PostAsJsonAsync("https://api.orbit-z.shop/v1/chat/completions", new { model = "orbit-z", messages = new[] { new { role = "user", content = "Olá" } } });HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.orbit-z.shop/v1/chat/completions"))
.header("Authorization", "Bearer oz_live_SUA_CHAVE")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody)).build();req, _ := http.NewRequest("POST", "https://api.orbit-z.shop/v1/chat/completions", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer oz_live_SUA_CHAVE")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)A resposta segue Chat Completions. Erros usam HTTP 400, 401, 429, 502 ou 504 e sempre incluem error.code e request_id. Consulte seu saldo em GET /v1/usage.