Documentation
BoostRail provides an OpenAI-compatible API. If your application already uses the OpenAI SDK, point base_url at the gateway and use a platform key — every model in the catalog becomes available.
Four steps to integrate
- Create an account — an organization and project are set up automatically.
- Create an API key in the console. The plaintext is shown only once; store it in a secrets manager.
- Set base_url and api_key in your SDK or HTTP client.
- Make a request. Model names are listed on the Models page, or query GET /v1/models.
Code samples
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.boostrail.com/v1",
)
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
for chunk in response:
print(chunk.choices[0].delta.content or "", end="")Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.boostrail.com/v1",
});
const completion = await client.chat.completions.create({
model: "deepseek-v4-pro",
messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);curl
curl https://api.boostrail.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello"}]
}'Endpoints
GET /v1/models— list the models available to your account.POST /v1/chat/completions— chat completions, including stream=true for server-sent events.
Common errors
| HTTP status | Error code | Meaning |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | No key or a wrong key — check the Authorization header. |
| 403 | disabled_api_key / expired_api_key | The key is disabled or expired — rotate it in the console. |
| — | Insufficient balance | Requests are rejected without going negative; top up to resume. |
Security notes
Never put API keys in frontend code, public repositories, logs, or screenshots. If a key may have leaked, disable it in the console immediately and create a new one.