Docs
API reference
Base URL https://api.siren-rp.com/v1. JSON in, JSON (or server-sent events) out. Authenticate with
Authorization: Bearer sk-siren-….
POST /v1/chat/completions
The OpenAI Chat Completions format. model is siren-rp (or
siren/siren-rp). messages is the usual list of system,
user and assistant messages.
POST https://api.siren-rp.com/v1/chat/completions
Authorization: Bearer sk-siren-...
Content-Type: application/json
{
"model": "siren-rp",
"messages": [
{"role": "system", "content": "You are Duke Silas Thorne..."},
{"role": "user", "content": "Good evening, Your Grace."}
],
"temperature": 0.9,
"min_p": 0.05,
"max_tokens": 400,
"stream": true,
"stream_options": {"include_usage": true}
} Parameters
| Name | Range | Notes |
|---|---|---|
model | string | Required. siren-rp. |
messages | array | Required. Role + content. |
stream | boolean | Server-sent events when true. |
stream_options | object | {"include_usage": true} adds usage to the last chunk. |
temperature | 0 – 2 | Higher is livelier; 0.8–1.0 suits most characters. |
top_p | 0 – 1 | Nucleus sampling. Leave at 1 if you use min_p. |
top_k | 0 – 200 | 0 turns it off. |
min_p | 0 – 1 | Drops tokens far below the likeliest one; 0.05 is a good start. |
frequency_penalty | -2 – 2 | Discourages repeating the same words. |
presence_penalty | -2 – 2 | Nudges toward new topics. |
repetition_penalty | 1 – 2 | Multiplicative; 1.05–1.1 keeps long chats fresh. |
max_tokens | 1 – 8192 | Reply length cap. |
stop | up to 4 strings | For example "\n{{user}}:" in text-style prompts. |
seed | integer | Same seed and prompt give a repeatable reply. |
Response
A standard chat.completion object (or chat.completion.chunk events when streaming). The
usage object includes prompt_tokens_details.cached_tokens: the prompt tokens billed at the
cached price.
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "siren-rp",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "*He sets down the glass...*"},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 2048, "completion_tokens": 180, "total_tokens": 2228,
"prompt_tokens_details": {"cached_tokens": 1920}
}
} GET /v1/models
Lists the one model. Frontends use it to fill their model dropdown.
{
"object": "list",
"data": [{"id": "siren-rp", "object": "model", "owned_by": "siren", "context_length": 131072}]
} Errors
Errors use one shape, with the HTTP status repeated in code:
{"error": {"message": "Your balance is used up. Top up at siren-rp.com/console/billing.", "code": 402}} | Status | Meaning | How to fix |
|---|---|---|
| 400 | The request is malformed, or the prompt is longer than your plan's context. | Check the JSON body. For context errors the message names your plan's limit: lower your frontend's context size to fit, or move to a plan with more context. We never cut a prompt silently. |
| 401 | The API key is missing, mistyped or revoked. | Send Authorization: Bearer sk-siren-… with a live key from the console. Check for spaces copied around the key. |
| 402 | Your balance is used up, or this key reached its monthly spend cap. | Top up in Billing, subscribe to a plan, or raise the key's cap (create a new key with a higher cap). |
| 429 | A capacity limit: your plan is already running its maximum parallel requests, or the shared pool is full. | Wait for the Retry-After header (usually 2 seconds) and retry. Lower the number of generations you run at once or pick a plan with more concurrency. |
Refused requests (any 4xx) are never charged.
Limits
- Context: 128K tokens on pay as you go and the Builder plan; Starter 32K, Plus 64K.
- Output: up to 8,192 tokens per reply (
max_tokens). - Parallel requests: plans allow Starter 1, Plus 2, Builder 4 at once; pay as you go runs up to 8 at once.
- Balance: a request needs a positive balance to start; a reply in flight always finishes.
- Over a limit you get an immediate 429 with
Retry-After, never a slow queue.