Give your app AI
Point any OpenAI- or Anthropic-compatible client at the gateway, authenticate with your Dibbla token, and read every call back in the ledger.
The gateway’s whole proposition fits in one sentence: your Dibbla token is the model key. Point a client at the gateway, put your Dibbla token where the provider key would go, and the platform swaps in its own on the way out.
Nobody on your team ever holds an OpenAI or Anthropic key, and every call is attributed to your organisation.
From a deployed app
Your app needs two things: the gateway’s URL, and a Dibbla token to
authenticate with. The platform gives every deployed app the URL as
DIBBLA_AI_GATEWAY_URL. The token is yours to set, as a secret, before you
write any code:
# paste a Dibbla API token, minted in the portal under API keys, when asked $dibbla secrets set DIBBLA_API_TOKEN -d my-app # or have it typed on a Dibbla page — what an AI assistant runs $dibbla secrets request DIBBLA_API_TOKEN -d my-app --title "Dibbla API token"
Every deployment — a single Dockerfile, which is what
your first deploy produces, as much as a dibbla.yaml
manifest — receives DIBBLA_AI_GATEWAY_URL and DIBBLA_ALIAS. It never
receives DIBBLA_API_TOKEN: nothing would be safe about handing every
container a credential for the whole organisation.
Two endpoints are exposed, so you keep using whichever SDK you already know:
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["DIBBLA_AI_GATEWAY_URL"] + "/openai/v1",
api_key=os.environ["DIBBLA_API_TOKEN"], # your Dibbla token
)
client.chat.completions.create(model="gpt-6-luna", messages=[...]) import os
from anthropic import Anthropic
client = Anthropic(
base_url=os.environ["DIBBLA_AI_GATEWAY_URL"] + "/anthropic",
api_key=os.environ["DIBBLA_API_TOKEN"], # your Dibbla token
)
client.messages.create(model="claude-haiku-4-5", max_tokens=200, messages=[...]) Which providers and models are on offer, and where each one processes your calls — including EU-only Berget AI — is on Models & providers.
Send the X-Dibbla-App header — your DIBBLA_ALIAS — and the call is
recorded against that app. Send the variable as it is: it is the full
deployment name in the app’s address (my-app-0ee1f995), and the shorter
name you deployed with (my-app) is not recognised. Without the header, or
with a name the gateway does not recognise, the call still works; it is
simply recorded as coming from outside.
From your laptop
The same gateway backs your own tools. dibbla ai env prints the exports for
Claude Code, Cursor or opencode:
$dibbla ai url $eval $(dibbla ai env) $dibbla ai test
The ledger
Every call lands in a ledger you can read, live.

Time, user, app, route, model, prompt and completion tokens, latency, status. Calls made by a deployed app carry its alias; calls from a laptop tool show as external. AI Maintenance and application checks appear under the app they ran on, labelled as such. When the AI Maintenance add-on includes them they are marked Included in AI Maintenance and kept out of your totals. Clicking a row opens the full trace.
What each call costs
Every call made with Dibbla’s key shows what it costs, in euro, in the Cost column: per call, per workflow run, and summed for whatever you have filtered on — a time range, a workflow, a run, a user, a model, a status. To get the cost of a batch of runs, filter on them and read the total. A pipeline run shows its own cost beside its tokens, added up over every workflow run it triggered, and its View in AI console opens exactly those runs here — up to 10,000 of them — with the same total.
- The price is the provider’s list price, converted to euro. Dibbla adds no markup per token; Dibbla’s 5 % is added when you top up your AI credits, and each call draws exactly this price from them. The price is fixed when the call finishes, so a later price change or exchange rate never changes what a past call cost.
- Calls made before costs were recorded per call were priced afterwards, once, at the list price of that day. They are marked ≈.
- A call to a model without a list price is shown as unpriced and counted as “N calls without a price” next to the total, never as zero.
- Calls on your own provider key are paid to the provider directly, so they are not counted; they are marked own key. Neither are calls the AI Maintenance add-on includes; they are marked as included.
- Only calls through the gateway are counted. A model call your app makes straight to a provider, with a key of its own, never reaches the ledger.
- A filter adds up every call in it. Filtering on a workflow and a time range includes runs that others in your organisation started in that window. Filter on the run to get one run’s cost.
The (?) next to the column heading says the same in the console.
A month’s cost, per app, workflow and person
Monthly cost, next to Ledger at the top of the console, answers “what did AI cost us last month, and what drove it?” Pick a month — last month is shown first — and read its cost in euro, its tokens and its number of calls, broken down by app, by workflow or by user, most expensive first. Click a row to open that app’s, workflow’s or person’s calls of the month in the ledger.
Export CSV downloads the breakdown you are looking at: one line per app, workflow or user, then a total line, with the same sums as the view. Costs carry six decimals, so the lines add up to the total.
- A month is a calendar month in UTC.
- It counts what the Cost column counts. Calls on your own provider key are in the tokens but not in the cost, and shown as “not counted”; calls the AI Maintenance add-on includes — AI Maintenance and application checks — are in neither.
- “Without a price” says how many calls had no list price. They are in the tokens, never counted as zero in the cost.
- Calls without an app or a workflow — a laptop tool, a script — are one row of their own, (no app) or (no workflow), so every breakdown adds up to the same total.
The console shows the same data aggregated, which is the view you want when the question is about spend rather than about one request:

Retired models
A provider announces the day it shuts a model down. Until then the model is
Retiring: it answers as before, and every response carries headers that
name the day and the model that replaces it. From that day it is Retired:
calls that name it are answered by the replacement and priced as the
replacement, and the ledger shows which model answered. A retired model
with no replacement is refused with 410 MODEL_RETIRED, and the message
says what to switch to.
Bring your own provider key
By default the platform’s key signs your calls and each call’s price is drawn from your organisation’s AI credits. An organisation admin can instead store the organisation’s own OpenAI or Anthropic key under Organization settings → AI, on the Provider API keys card. From then on that key signs all of the organisation’s gateway traffic — deployed apps included — so the provider bill follows the key, and those calls no longer touch your AI credits or the monthly limit. Nothing else changes: the same URL, the same Dibbla token, the same ledger. The key is validated against the provider before it is saved, stored encrypted, and never returned to the browser afterwards.
Anthropic keys and the workspace id
Every key you can create in the Claude Console today is identity-linked — tied to a person or a service account rather than to a workspace. If the key was not created scoped to one specific workspace, Anthropic requires each call to name a workspace, and rejects it otherwise:
anthropic-workspace-id is required when authenticating with an identity-linked API key
Paste that workspace id into the optional Workspace ID field next to the
key. Open the workspace in the Claude Console and copy the wrkspc_… id from
the address bar. It is stored and shown in the clear — it identifies a
workspace, it does not authenticate to one — and travels with the key: rotate
onto a workspace-scoped key and clear the field, and nothing stale is left
behind. Leave it empty for a workspace-scoped key, and for OpenAI, which has
no such concept.
Provider keys spread. One gets pasted into a laptop, another into a CI variable, and eighteen months later nobody can say which app is spending what — or rotate a key without breaking something unknown. Here there is one credential per person or app, it is already rotatable, and attribution is a property of the system rather than a convention people follow.