ROK Logo

Developers

OpenAI-Compatible API

Chat completions with native tool calling and streaming. Point any OpenAI SDK at ROK and it just works — you just need an API key, which any signed-in user can create instantly.

Get an API key

Base URL

https://rokremasteredapi.rokteam.org/v1

Auth

API key required — Authorization: Bearer <key> or X-ROK-API-Key. Create your free key — sign in, and it is generated instantly.

Limits

A per-minute rate limit and a daily cap shared across every key on your account (refills 00:00 UTC) · only successful completions count.

Models

rok-hermes (default), -raw (uncensored) — both accept image_url parts.

Quickstart

curl
curl https://rokremasteredapi.rokteam.org/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ROK_API_KEY" \
  -d '{
    "model": "rok-hermes",
    "messages": [{"role": "user", "content": "Write a haiku about the ocean."}]
  }'

Python

python
from openai import OpenAI

client = OpenAI(
    base_url="https://rokremasteredapi.rokteam.org/v1",
    api_key="<your ROK API key>",  # create one at https://rok.rokteam.org/developers
)

completion = client.chat.completions.create(
    model="rok-hermes",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(completion.choices[0].message.content)

JavaScript / TypeScript

ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://rokremasteredapi.rokteam.org/v1",
  apiKey: "<your ROK API key>",
});

const completion = await client.chat.completions.create({
  model: "rok-hermes",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);

Add stream: true for token-by-token streaming (see Streaming).

Models

GET https://rokremasteredapi.rokteam.org/v1/models lists them in the standard OpenAI shape. An unknown name returns 400 model_not_found.

ParameterTypeDescription
rok-hermesdefaultROK's standard model. Used when model is omitted. Accepts OpenAI-style image_url parts with data: URLs.
rok-hermes-rawuncensoredUncensored general-purpose variant with a fixed server-side personality prompt: blunt, no lectures, and willing to engage properly with politics, mature and controversial subjects. Refusing real-world harm (and anything sexual involving minors) is still part of the prompt.
rok-hermes-raw is uncensored, not lawless
It still refuses real-world harm: any sexual content involving minors, non-consensual content about real people, targeted harassment, and weapons/explosives instructions. Uncensored means the tone stops hedging — not that the floor is gone.

Request parameters

POST https://rokremasteredapi.rokteam.org/v1/chat/completions — everything except messages is optional.

ParameterTypeDescription
messagesarray (required)Chat messages as [{role, content}]. Roles: system, user, assistant, tool. Tool results use {role: "tool", tool_call_id, content}.
modelstringOptional — defaults to "rok-hermes". See Models.
streambooleanWhen true, return an SSE stream instead of a single JSON body.
toolsarrayFunction definitions forwarded to the engine. Returned tool_calls describe CLIENT-side tools — the server never executes them.
tool_choicestring | object"auto" (default), "none", or {"type": "function", "function": {"name": "..."}} to force a tool.
temperaturenumberSampling temperature. Defaults to 0.7.
top_pnumberNucleus sampling probability mass.
max_tokensintegerMaximum tokens to generate. Clamped to 4,096 — requesting more never errors.
frequency_penaltynumberPenalizes tokens based on how often they appear so far.
presence_penaltynumberPenalizes tokens that have already appeared.
stopstring | string[]Up to a few strings where generation should stop.
seedintegerReproducibility hint for the sampler.
stream_optionsobjectSet {"include_usage": true} to append a final usage chunk.
Tool calling is a passthrough
The server never executes tools. Run them on your client and send each result back as a role: "tool" message with the matching tool_call_id.

Streaming

With stream: true you get an SSE stream of chat.completion.chunk objects, terminated by data: [DONE].

raw SSE
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" world"},"finish_reason":null}]}

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]

Add stream_options: {"include_usage": true} for a final chunk with a usage field.

Errors

Errors follow the OpenAI shape: {"error": {message, type, param, code}}.

Statuserror.typeWhen
401authentication_errorMissing or invalid API key. Create one at https://rok.rokteam.org/developers — a key that stopped working may have been revoked.
400invalid_request_errorMalformed body, empty messages, invalid model name, or bad max_tokens usage.
429rate_limit_errorThe rate limit or the shared daily cap was reached. Includes Retry-After and X-RateLimit-* headers.
502server_errorThe upstream model service returned an error.
503server_errorThe model service is not configured, unreachable, or temporarily rate limited.

429s include Retry-After plus X-RateLimit-Limit, -Remaining, and -Reset headers.

Rate limits

  • A per-minute rate limit (rolling window, counted per client IP).
  • A daily cap per account, shared by every key you hold and refilling at 00:00 UTC. Creating another key does not add capacity.
  • Neither meters the IP — the daily cap follows youraccount, and the rate limit your connection — so rotating addresses, keys or both doesn't help.
  • A whole-endpoint ceiling protects shared capacity, so no single fleet can drain the day for everyone.
  • Only successful completions count; streaming is one request; GET /models is free.
  • ROK does not publish the exact ceilings — your live usage for the day is on the key dashboard, and every 429 carries Retry-After plus X-RateLimit-* headers.