Docs · Guides

AI endpoints.

Call open models from your apps through an API that works with the OpenAI SDKs, without your prompts leaving Canada. The models run on Canner’s own server in Montréal and on a GPU at Canner’s offices. Nothing you send is stored: we count requests and time them, and that’s all.

What you get

ModelGood forSpeed (approx.)Licence
gemma-4-e4bFast answers: chat, summaries, extraction, uncertainty (GPU)~67 tokens/s written, ~6,000 readApache 2.0 (Google)
gemma-4-26b-a4bThe best answers: chat, summaries, extraction, uncertainty~18 tokens/s written, ~70 readApache 2.0 (Google)
granite-4.2-3bScoring, classification, and the research endpoints~22 tokens/s written, ~115 readApache 2.0 (IBM)
bge-m3Embeddings for search, English and French~850 tokens/sMIT (BAAI)

A 300-word answer takes about 6 seconds from gemma-4-e4b and about 30 from gemma-4-26b-a4b. The other models run on processors: they are made for features that can take a few seconds — drafting, summarising, classifying, searching.

gemma-4-e4b and bge-m3 embeddings run on the GPU. When it is unavailable, gemma-4-e4b requests are answered by gemma-4-26b-a4b (the response’s model says so) and embeddings by the same model on processors.

Get started

  1. In the dashboard, open AI and create an endpoint. Pick the models it may use.
  2. Attach it to a project — the project gets OPENAI_BASE_URL and OPENAI_API_KEY on its next deploy — or create a key to call it from anywhere.
  3. Use any OpenAI SDK.
import OpenAI from 'openai';

// In an attached project both variables are already set.
const client = new OpenAI(); // reads OPENAI_BASE_URL and OPENAI_API_KEY
const r = await client.chat.completions.create({
  model: 'gemma-4-26b-a4b',
  messages: [{ role: 'user', content: 'Résume ce courriel en une phrase : …' }],
});
console.log(r.choices[0].message.content);
from openai import OpenAI

client = OpenAI()  # OPENAI_BASE_URL + OPENAI_API_KEY
r = client.embeddings.create(model="bge-m3", input=["Le loyer est dû le premier du mois."])
print(len(r.data[0].embedding))  # 1024
curl https://ai.canner.ca/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "granite-4.2-3b", "messages": [{"role": "user", "content": "Bonjour!"}]}'

From the CLI:

canner ai create support-bot --models gemma-4-26b-a4b,bge-m3
canner ai attach support-bot     # in the project folder
canner redeploy

If a project already sets its own OPENAI_* variables (to use OpenAI itself, for example), those win; the attached endpoint’s key is also available as CANNER_AI_API_KEY with CANNER_AI_BASE_URL.

Standard endpoints

  • POST /v1/chat/completions — the OpenAI chat format: streaming, tools, and response_format with a JSON schema (the output is guaranteed to match the schema). Up to 16,384 tokens of context and 2,048 of output, one answer per request, text only (no images or audio). Thinking is off unless you pass "chat_template_kwargs": {"enable_thinking": true}.
  • POST /v1/embeddings — bge-m3, 1,024 dimensions, normalised. Up to 128 texts per request, 8,192 tokens each. See Search your own documents.
  • GET /v1/models — the models your endpoint may use.

A request without model uses the first model in the endpoint’s list that can handle that kind of request.

Canner’s extra endpoints

These go beyond the OpenAI API. They answer the questions regulated work keeps asking: how sure is the model? and why did it say that?

Classify

Sort a text into your categories and get a probability for every one, not just a winner.

POST https://ai.canner.ca/v1/classify
{ "model": "granite-4.2-3b",
  "input": "I was charged twice for October.",
  "labels": ["billing", "technical problem", "account access"],
  "priors": [0.5, 0.3, 0.2] }

The probabilities are calibrated: the model’s standing preference for some labels is removed (measured against an empty input), and its scores are softened so that “90%” means right about 9 times in 10. On public test sets: 81% accuracy on 4 news topics in English and 97% on French film-review sentiment, with a gap between stated confidence and actual accuracy of 0.07 and 0.03. Up to 20 labels; the optional priors say how common each label is in your data. The optional instruction (up to 2,000 characters) tells the model what it is reading; it replaces the default “Classify the text into exactly one of these categories.”

Uncertainty

Ask a question several times and see whether the model agrees with itself.

POST https://ai.canner.ca/v1/uncertainty
{ "model": "gemma-4-26b-a4b", "n": 5,
  "messages": [{ "role": "user", "content": "Which clause allows early termination?" }] }

Returns the most common answer, agreement (the share of answers that mean the same thing), semantic_entropy, token entropy, and every answer drawn. With Gemma on 200 trivia questions: when at least 80% of its answers agreed it was right 81% of the time; when they did not, 22%. Treat low agreement as a reason to send the case to a person. Gemma is much better at this than Granite, which is often consistently wrong. It costs about n times a normal answer.

Score

POST /v1/score returns how likely the model finds each word of a text, and its perplexity: for spotting unusual clauses, garbled scans, or ranking candidate answers. Pass context to score the text as its continuation.

Research endpoints

Slower, and run after every other request. For investigating how the model reaches an answer. Granite only. Attribute and steer are by invitation: without one they return 403 invite_only.

  • POST /v1/attribute — which words of your input led the model to a given answer (integrated gradients). About a minute for a short prompt; inputs up to 128 tokens. The response says how completely the attributions account for the answer (completeness.error; around 10% is typical).
  • POST /v1/steer — shift the tone of an answer towards some example sentences and away from others, without changing the prompt. strength from −1 to 1: around 0.5 changes the tone and keeps the answer on topic; 1 often drifts off it.
  • /v1/probes — train a small classifier on the model’s internal state from your labelled examples (8 to 400, 2 to 10 labels, at least 4 per label), then apply it to new text. Only the probe’s weights are kept, never the examples. It needs well over a hundred examples to be useful.

Pricing

ModelRequestsPrice
gemma-4-e4bChat, uncertainty$0.10 in / $1.00 out per million tokens
gemma-4-26b-a4bChat, uncertainty$1.00 in / $5.00 out per million tokens
granite-4.2-3bScore$0.50 per million tokens
granite-4.2-3bClassify$0.20 per 1,000 requests
granite-4.2-3bUncertainty, research$0.10 in / $1.00 out per million tokens
bge-m3Embeddings$0.03 per million tokens

A request is charged at the price of the model it names: a gemma-4-e4b request answered by gemma-4-26b-a4b costs the gemma-4-e4b price. Failed requests cost nothing. A chat answer that reads 1,000 tokens and writes 400 costs about $0.0005 on gemma-4-e4b.

PlanAI usage included a month
StarterNone
Live$9
EnterpriseSet in the contract

Add $29 of usage for $29 a month in Billing → Add-ons. When the month’s usage runs out, requests are refused with 429 insufficient_quota until the 1st or until you add more; nothing is billed by surprise. Every response carries X-Canner-Cost (that request, in dollars) and X-Canner-Usage-Remaining.

Waiting your turn

The processor models share four cores and answer one request at a time; the GPU has its own queue. Paid plans go first, then Starter; research requests go last. A request waits up to 2 minutes (research: 15) and an organization can have 4 waiting (research: 1); beyond that you get 429 server_busy with a Retry-After header. Set a requests-per-minute limit on an endpoint to protect your usage from a runaway loop.

Content policy

Chat, uncertainty and steer requests are checked by a safety model (Qwen3Guard) before the model answers, and the answer is checked before it is returned. The checks’ time is not charged.

  • A blocked request gets 400 content_filter.
  • A blocked answer comes back empty with finish_reason: "content_filter". A streamed answer is checked once it has been sent: it is recorded, not stopped.
  • When 10 or more requests in 24 hours are blocked and they are at least a fifth of an organization’s checked requests, its AI is paused: every call gets 403 ai_paused until we have reviewed it. Some blocks pause it at once.
  • Embeddings, score, classify and probes are not checked.

Your data

  • Prompts and answers are processed in memory on Canner’s server in Montréal or the GPU at Canner’s offices, and never written down. Per request we record the time, the endpoint and key, the model, the kind of request, the number of tokens and how long it took.
  • When the content policy flags or blocks something, we also record the safety model’s verdict and categories, never the text. The one exception: a request blocked as sexual content involving minors is kept encrypted for 90 days (see the Acceptable Use Policy).
  • Nothing is sent to another company. Nothing is used to train anything.
  • A revoked key, or the key of a detached project, stops working within 30 seconds.
  • Keys, attached projects and probes are recorded in the audit log.

Errors

StatusCodeMeaning
401invalid_api_keyMissing, malformed or revoked key
403model_not_allowedThe endpoint doesn’t include that model
403endpoint_disabledThe endpoint is turned off
400content_filterBlocked by the content policy
429insufficient_quotaThe month’s AI usage is used up
403ai_pausedThe organization’s AI is paused
403invite_onlyAttribute and steer need an invitation
429server_busy, rate_limit_exceededToo many waiting, or the endpoint’s per-minute limit
503model_unavailableA model is restarting (about 15 s); retry after Retry-After