Build with Real Sentry AI
One base URL for text, vision, streaming, model discovery, and usage. Existing OpenAI-compatible clients work by changing the base URL and API key.
https://ai.realsentry.org/v1Authentication
Send your Real Sentry API key as a Bearer token on authenticated endpoints. Keys begin with sk-rs-.
Authorization: Bearer sk-rs-YOUR_KEYKeep keys on the server and rotate a key immediately if it is exposed.
Models
Returns the models currently published by the administrator. Authentication is not required.
curl https://ai.realsentry.org/v1/models{
"object": "list",
"data": [
{
"id": "MODEL_ID",
"object": "model",
"owned_by": "real-sentry",
"endpoint": "/v1/chat/completions",
"supports_vision": true,
"supports_streaming": true
}
]
}Chat Completions
OpenAI-compatible multi-turn chat for text generation, vision, tool calling, JSON output, and SSE streaming.
curl https://ai.realsentry.org/v1/chat/completions \
-H "Authorization: Bearer sk-rs-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [
{"role": "system", "content": "You are concise."},
{"role": "user", "content": "Write a launch announcement."}
],
"stream": false
}'
JavaScript SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.REAL_SENTRY_API_KEY,
baseURL: "https://ai.realsentry.org/v1"
});
const completion = await client.chat.completions.create({
model: "MODEL_ID",
messages: [{ role: "user", content: "Hello!" }]
});Text + image input
For a vision-capable model, pass text and an image URL—or a base64 data URI—as message content parts.
{
"model": "VISION_MODEL_ID",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{"type": "image_url", "image_url": {
"url": "https://example.com/image.png"
}}
]
}]
}Responses API
Use the unified Responses format with string or structured input, instructions, tools, reasoning controls, and streaming.
curl https://ai.realsentry.org/v1/responses \
-H "Authorization: Bearer sk-rs-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"input": "Summarize this update in four bullets."
}'Streaming
Set "stream": true for Server-Sent Events. Chat streams end with data: [DONE]; Responses streams emit typed events including response.output_text.delta and response.completed.
{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Stream a haiku."}],
"stream": true
}Usage
Returns the current key's daily token quota and per-minute request state.
curl https://ai.realsentry.org/v1/usage \
-H "Authorization: Bearer sk-rs-YOUR_KEY"{
"plan": "standard",
"limits": {"tokens_per_day": 250000, "rpm": 30},
"usage": {
"tokens_used_today": 18420,
"tokens_remaining_today": 231580,
"percent_used": 7.4,
"resets_at_utc": "2026-09-27T00:00:00.000Z"
}
}Errors & rate limits
Non-streaming errors use a consistent JSON body. In-flight streaming errors arrive as an SSE data: event.
{
"error": {
"message": "Human-readable description.",
"type": "invalid_request_error",
"code": "missing_required_parameter",
"param": "model"
}
}| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request_error | Malformed body, missing field, or unknown model. |
| 401 | authentication_error | Missing or invalid API key. |
| 403 | permission_error | The key cannot use the selected model. |
| 413 | payload_too_large | Request exceeds the configured body limit. |
| 429 | rate_limit_error | RPM or daily token quota reached. |
| 500 | server_error | Internal service error. |
| 502 / 503 | provider_error | The selected model is temporarily unavailable. |
Retry 429, 500, 502, and 503 with exponential backoff and jitter. Fix the request before retrying other 4xx errors.