Reference
API
01Endpoint
- Base URL
- https://api.stealthalpha.dev/v1
- Protocol
- OpenAI-compatible
- Auth
- Authorization: Bearer $STEALTH_API_KEY · required on POST routes
- GET
- /v1/models · no key
- POST
- /v1/chat/completions · stream, tools
02Models
- stealth-1
- live
- stealth-2
- live
curl https://api.stealthalpha.dev/v1/models
03Chat completions
curl
curl https://api.stealthalpha.dev/v1/chat/completions \ -H "Authorization: Bearer $STEALTH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"stealth-1", "messages":[{"role":"user","content":"Hello"}]}'
Python · openai
import os from openai import Client client = Client(base_url="https://api.stealthalpha.dev/v1", api_key=os.environ["STEALTH_API_KEY"]) r = client.chat.completions.create( model="stealth-1", messages=[{"role": "user", "content": "Hello"}]) print(r.choices[0].message.content)
JavaScript · openai
import Client from "openai"; const client = new Client({ baseURL: "https://api.stealthalpha.dev/v1", apiKey: process.env.STEALTH_API_KEY, }); const r = await client.chat.completions.create({ model: "stealth-1", messages: [{ role: "user", content: "Hello" }], }); console.log(r.choices[0].message.content);
04Streaming
Set stream: true. Server-sent events, one data: line per chunk, terminated by data: [DONE]. A failure after the stream opens arrives as an error frame, then [DONE].
data: {"choices":[{"index":0,"delta":{"content":"Hel"}}],...}
data: {"choices":[{"index":0,"delta":{"content":"lo"}}],...}
data: [DONE]
# error mid-stream
data: {"error":{"message":"...","type":"...","code":"model_unavailable"}}
data: [DONE]
Python · openai
stream = client.chat.completions.create(
model="stealth-2", stream=True,
messages=[{"role": "user", "content": "Hello"}])
for chunk in stream:
if chunk.choices:
print(chunk.choices[0].delta.content or "", end="")
JavaScript · openai
const stream = await client.chat.completions.create({
model: "stealth-2", stream: true,
messages: [{ role: "user", content: "Hello" }],
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
05Tool calls
Standard tools / tool_choice. Calls come back in message.tool_calls; answer with a role: "tool" message carrying the same tool_call_id.
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]}}}]
msgs = [{"role": "user", "content": "Weather in Oslo?"}]
r = client.chat.completions.create(
model="stealth-2", messages=msgs, tools=tools)
call = r.choices[0].message.tool_calls[0]
# call.function.name == "get_weather"
# call.function.arguments == '{"city": "Oslo"}'
msgs += [r.choices[0].message,
{"role": "tool", "tool_call_id": call.id,
"content": '{"temp_c": 4}'}]
r = client.chat.completions.create(
model="stealth-2", messages=msgs, tools=tools)
06Errors
{"error":{"message":"...","type":"...","code":"daily_limit"}}
| code | HTTP | When |
|---|---|---|
| invalid_request | 400 | Malformed body or parameters |
| invalid_api_key | 401 | Key missing, unknown or revoked |
| consent_required | 403 | Current policy version not accepted |
| model_not_found | 404 | Unknown slug; message lists live slugs |
| model_not_available | 404 | Slug exists, status soon |
| model_retired | 410 | Slug retired |
| daily_limit | 429 | Daily requests used; resets 00:00 UTC |
| concurrency_limit | 429 | Too many in-flight requests on this key |
| model_unavailable | 503 | Model failed to answer; also sent as an SSE error frame |
07Limits
- Plan
- Free trial
- Daily
- 200 requests per key per UTC day · resets 00:00 UTC
- Concurrency
- 2 concurrent requests per key
- Exceeded
- HTTP 429 · daily_limit or concurrency_limit
08Public API
- Base
- https://stealthalpha.dev/api
- Auth
- none · read-only, CORS *
GET /api/catalog
curl "https://stealthalpha.dev/api/catalog?status=live,soon&limit=12"
{"object":"catalog","data":[{"slug":"stealth-2","name":"Stealth 2",
"tagline":"...","status":"live","created":"2026-11-15","metrics":{...}},...]}
GET /api/models/:slug
curl https://stealthalpha.dev/api/models/stealth-1
{"object":"model","slug":"stealth-1","name":"Stealth 1","status":"live",
"metrics":{"1h":{...},"24h":{...},"7d":{...}}}
GET /api/rankings
curl https://stealthalpha.dev/api/rankings
{"object":"rankings","by":"usage","period":"24h","unit":"tokens",
"data":[{"rank":1,"slug":"stealth-1","value":...,"share":...},...]}
09Data
- Now
- Prompt logging is not active. Only request and token counters are kept.
- From start date
- Free tier: prompts, completions and request metadata are logged. Secrets and personal data are masked before storage. Kept 90 days. Shared with participating model providers for evaluation. · start date posted on /privacy, not set yet
- No-log
- Paid tier, planned
- Consent
- Keys work only after the current policy version is accepted; otherwise HTTP 403 consent_required
- Policy
- Terms of Use · Privacy Policy