OpenAI-compatible API
Orbit AI API accepts OpenAI-compatible requests. Point your client's Base URL to Orbit AI API and provide the API key created in the console.
Connection parameters
| Parameter | Value |
|---|---|
| Base URL | https://orbitaiapi.site/v1 |
| Authentication | Authorization: Bearer YOUR_API_KEY |
| Model | Exact name shown in the console's model list |
cURL example
Replace YOUR_API_KEY with your API key and MODEL_NAME with an actual model name from the console.
curl https://orbitaiapi.site/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "MODEL_NAME",
"messages": [
{"role": "user", "content": "Introduce yourself in one sentence."}
]
}'
JavaScript example
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.ORBIT_API_KEY,
baseURL: 'https://orbitaiapi.site/v1',
});
const completion = await client.chat.completions.create({
model: 'MODEL_NAME',
messages: [{role: 'user', content: 'Introduce yourself in one sentence.'}],
});
console.log(completion.choices[0].message.content);
Image endpoints
In addition to chat completions, Orbit AI API also supports OpenAI-compatible image generation and image editing. See Image Generation and Editing for full parameters, cURL examples, and SDK samples.
Common integration checks
401: The API key is usually missing, incorrect, disabled, or sent with a malformed authorization header.404: Confirm that the Base URL includes/v1and that the request path matches the API type.- Model unavailable: Use the exact model name shown in the console, as described in Model list.