Skip to content
User guide

AI gateway, models and keys

How your projects call AI models through the REM CloudHub AI gateway: model names, keys with budgets and limits, attaching a key, the playground and usage.

Every AI call your projects, jobs and agents make goes through the REM CloudHub AI gateway with a key. A key has the models it may use, a budget and rate limits, and a list of the places that use it. A key is never copied into your code: places are attached to it, so rotating or blocking a key reaches all of them at once.

Open AI in the sidebar. Its tabs: Models, Keys, Usage & budget, Agents, MCP servers, Skills, Context, Connectors, Playground.

Models

The Models tab lists the model names your plan includes, such as rch-fast and rch-advanced, each with a plain description and its tier. A REM CloudHub model name is served by one or more provider models behind it, tried in order: if the first fails or is cooling down, the gateway uses the next. You call the name; you never handle a provider key.

Create a key

  1. AI > Keys > Create key (or Create > New AI key).

  2. Fill in:

Field

Meaning

Name

Lower-case letters, digits and dashes

Owner

The team or organisation that owns it

Description

What it is for

Models

Pick none to allow every model your plan includes

Budget in dollars

Calls stop when the key reaches it. No budget leaves it open

Budget resets

The period after which the budget starts again (for example every 30 days)

Requests a minute, Tokens a minute

Rate limits; No limit leaves them open

Rotation reminder

In days; you are reminded to rotate it

  1. Create. The key's value is shown once. Copy it if a program outside REM CloudHub needs it, then click I have copied it. REM CloudHub keeps only the last four characters.

Attach a key to a project or job

On the key's page click Attach to, pick the project, job, team or agent, and the Environment variable name the key will have inside it (default QFS_AI_KEY). It arrives at the next deploy, restart or run. Nobody pastes it anywhere.

A project can also get its own key: Project > Settings > Resources > AI key > Issue the key. It arrives as QCH_AI_KEY on every deploy.

Call a model from your code

The key's Use it tab shows the Endpoint (OpenAI-compatible) and a call example. Any OpenAI client works: point it at the endpoint and pass the key.

curl "$ENDPOINT/chat/completions" \
  -H "Authorization: Bearer $QFS_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "rch-fast", "messages": [{"role": "user", "content": "Hello"}]}'
from openai import OpenAI
import os

client = OpenAI(base_url=os.environ["AI_ENDPOINT"], api_key=os.environ["QFS_AI_KEY"])
reply = client.chat.completions.create(model="rch-fast", messages=[{"role": "user", "content": "Hello"}])
print(reply.choices[0].message.content)

One key's page

Tabs: Overview (spend, calls, and its settings: "What the key may do. Edit changes them; the value stays the same."), Where it is used (every place that references it), Requests (recent calls, within a minute), Use it, History (every change, from the audit trail). The header has Attach to… and Edit; More actions has Duplicate, Rotate, Disable / Enable and Delete. Rotating writes a new value and every attached project gets it on its next start.

Usage & budget

Pick a Period and see Total tokens, Estimated cost, Requests and Budget used; Where your tokens go splits them by key, model and input or output; Usage by key, Usage by model and the Usage log. Export CSV downloads it. An organisation admin can set a monthly budget for the whole organisation with Alert at (% of the budget), so the organisation hears about spend before it grows. The Credits ledger lists what the organisation's wallet added and took, newest first (see Plan, billing and REM Credits).

Playground

Pick a key and a Model, type a Message and Send. Each answer shows the tokens it read and wrote and how long it took. Playground calls count against the key's budget.

Your own provider keys

An organisation that wants to use its own account with an AI provider adds it under Connectors > AI providers (an add-on): name, provider, model names and API key. Custom provider addresses wait for platform approval. Projects can get a gateway team of their own with their own models and budget (Project teams). Organisations never see each other's keys.

Download: PDF · Word · Markdown