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

100 requests/minute · 1,000 completions/day shared across every key on your account (refills 00:00 UTC) · only successful completions count.

Models

rok-hermes (default), -spicy (adult), -vision (images).

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.
rok-hermes-spicyadult-contentAdult-content variant with a fixed server-side personality prompt. Explicit creative content is allowed; real-world harm is still refused.
rok-hermes-visionvisionImage understanding. Send image_url parts with data: URLs alongside text.
rok-hermes-spicy is an adult-content model
It still refuses real-world harm: minors, non-consensual content of real people, targeted harassment, and weapons/explosives instructions.

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_errorRate limit (100 requests/minute) or the shared daily cap (1,000 completions per UTC day across every key on your account) 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

  • 100 requests/minute (rolling window, counted per client IP).
  • 1,000 completions/day, shared by every key on your account, 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 4,000 completions/day whole-endpoint ceiling protects shared capacity.
  • Only successful completions count; streaming is one request; GET /models is free.