Real Sentry AI
REST API · OpenAI compatible

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.

Base URL
https://ai.realsentry.org/v1

Authentication

Send your Real Sentry API key as a Bearer token on authenticated endpoints. Keys begin with sk-rs-.

Authorization: Bearer sk-rs-YOUR_KEY

Keep keys on the server and rotate a key immediately if it is exposed.

Models

GET/v1/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

POST/v1/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

POST/v1/responses

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

GET/v1/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"
  }
}
StatusTypeMeaning
400invalid_request_errorMalformed body, missing field, or unknown model.
401authentication_errorMissing or invalid API key.
403permission_errorThe key cannot use the selected model.
413payload_too_largeRequest exceeds the configured body limit.
429rate_limit_errorRPM or daily token quota reached.
500server_errorInternal service error.
502 / 503provider_errorThe selected model is temporarily unavailable.

Retry 429, 500, 502, and 503 with exponential backoff and jitter. Fix the request before retrying other 4xx errors.