API Documentation
A single OpenAI-compatible chat completions endpoint, authenticated with your personal API key.
Base URL
base url
http://signalapis.xyzAuthentication
Send your key as a Bearer token. Never expose it in browser code — call the API from your server.
header
Authorization: Bearer YOUR_API_KEYCreate a chat completion
POST /api/v1/chat/completions
Use "model": "default" to let the platform pick the configured model.
bash
curl http://signalapis.xyz/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "default",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'Response
json
{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "default",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help?" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
},
"credits": { "used": 1, "remaining": 99 }
}Errors
All errors use a consistent JSON envelope.
json
{
"error": {
"message": "Insufficient credits",
"type": "insufficient_credits",
"code": 402
}
}| Type | HTTP | Meaning |
|---|---|---|
| invalid_api_key | 401 | The key is missing, malformed or unknown. |
| revoked_api_key | 401 | The key was revoked by its owner or an admin. |
| account_suspended | 403 | The owning account is suspended. |
| insufficient_credits | 402 | The account has no credits left. |
| rate_limit_exceeded | 429 | Too many requests in the current minute window. |
| invalid_request | 400 | Body validation failed (model, messages, sizes). |
| provider_error | 502 | Upstream AI provider failed. |
| internal_error | 500 | Unexpected server error. |
Rate limits & credits
- Default limit: 60 requests per minute per account (HTTP 429 with
Retry-After). - Credits are charged per 1,000 total tokens, minimum 1 credit per successful request.
- Failed requests do not consume credits.
- Every request is logged with tokens, latency, status and credits used.
Signal AI