Industrial Data|Infer
Light
Translate the site
English French Spanish

Documentation

A URL, a key, and a client.

OpenAI-compatible /v1 API at https://infer.industrialdata.ca/v1. Create an account, fund a prepaid balance, create an ide_sk_ key, and point any OpenAI client at that base URL. Prompts and completions are not stored.

Quickstart

Four steps from nothing to a first completion. The request builder below only writes code and sends nothing. The Sandbox sends a request when you press Run.

  1. Create an account at /signup. Enter your email and open the sign-in link we send you, or choose Sign in with IDE. There is no password.
  2. Fund your prepaid balance at /billing. Top-ups go through Stripe Checkout, and Enter promo code there takes you to /promo-enter to redeem a promo code. Requests are refused with 402 once the balance runs out.
  3. Create an API key at /account. The full ide_sk_… secret is shown once. Copy it before you leave the page.
  4. Send a request to https://infer.industrialdata.ca/v1/chat/completions with that key as a bearer token.
Base URL
https://infer.industrialdata.ca/v1. It already includes /v1. Do not append another.
$INFER_API_KEY
Your key, ide_sk_<12 hex>_<32 hex>. Treat it as a password. Do not commit it or ship it in a frontend bundle.
model
An exact id from GET /v1/models, such as qwen3.6-35b-a3b. Family names such as “Qwen” are not request IDs.
curl https://infer.industrialdata.ca/v1/chat/completions \
  -H "Authorization: Bearer $INFER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-35b-a3b",
    "messages": [{"role": "user", "content": "Explain bounded retries."}]
  }'

Request builder · python uses pip install openai, typescript uses npm install openai

Authentication

Every inference request carries your key as a bearer token. GET /v1/models is public and needs no key.

  • Send Authorization: Bearer ide_sk_<id>_<secret> on POST /v1/chat/completions and the other POST routes. X-Api-Key: ide_sk_… is accepted as well.
  • A missing, malformed, unknown, or revoked key is 401 with code invalid_api_key. Retrying will not help.
  • Clients that read OpenAI environment variables work unchanged: set OPENAI_BASE_URL to the base URL and OPENAI_API_KEY to your key.
  • CORS is open (Access-Control-Allow-Origin: *), but a key in browser code is a published key. Call the API from a server you control.
OpenAI SDK env vars
export INFER_API_KEY="ide_sk_…"   # from /account, shown once
export OPENAI_BASE_URL="https://infer.industrialdata.ca/v1"
export OPENAI_API_KEY="$INFER_API_KEY"
401 responseexample
{
  "error": {
    "message": "Invalid API key",
    "type": "authentication_error",
    "param": null,
    "code": "invalid_api_key"
  }
}

API keys

Keys belong to your account and draw on its prepaid balance. Manage them at /account.

Create
Sign in at /account, give the key a label (default if you leave it), tick at least one of the three boxes below, and create it. All three start off, and a key with none is refused. The page shows the full secret once. Only its SHA-256 hash is stored, so a lost key cannot be shown again. Create a new one and revoke the old one.
Local LAN
Call your Cores directly on the local network.
Internet: any Core
Call https://infer.industrialdata.ca/v1 using the general network pool.
Internet: my Cores
Call https://infer.industrialdata.ca/v1 routed to your own Cores (see Your Cores). With only this box, calls never use the pool. With both Internet boxes, your Cores go first and then the pool, unless the call asks for your Cores only.
Change
Change the boxes on a key at /account and select Save, or send PATCH /account/keys/<key id> with any of allow_local, allow_external, and local_use as JSON booleans. The secret stays the same.
Format
ide_sk_, a 12-hex-character key id, _, and a 32-hex-character secret. The account page lists the key id. The secret is shown once and is not shown again.
Activation
A key is active as soon as it is created. The API loads keys from a signed registry that it refreshes every 30 seconds, so a brand-new key can get 401 for up to about 30 seconds.
Revoke
Press Revoke next to the key at /account. The next request with that key to https://infer.industrialdata.ca/v1 is refused with 401 invalid_api_key. A Core's local address remembers a key it has allowed for up to 2 days (never past the end of your Sign in with IDE), so a revoked key can keep working there until then. Revoking cannot be undone.
Shown once Copy the secret into a secrets manager or an environment variable the moment it appears. Refreshing /account will not bring it back.

Sandbox

Pick an example, change its fields, and press Run to try it here, or copy the request as curl, Python, or TypeScript. The code is the POST /v1/chat/completions call you send with your own key.

Runs use a shared sandbox key on our side, so no account is needed. If you have a key, you can paste it below to run on your own account instead. Replies are capped at 512 tokens. Do not send anything private. Prompts and images are not stored.

curl https://infer.industrialdata.ca/v1/chat/completions \
  -H "Authorization: Bearer $INFER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-35b-a3b",
    "messages": [{"role": "user", "content": "Explain bounded retries."}],
    "max_tokens": 256,
    "reasoning": {"enabled": false}
  }'

Run needs JavaScript. You can copy the code and run it with your own key.

Run calls this site's sandbox with our key; the code above is the call you make with yours.

Responseexample
{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1795795200,
  "model": "qwen3.6-35b-a3b",
  "choices": [{
    "index": 0,
    "message": {"role": "assistant", "content": "Bounded retries cap how many times a client repeats a failed call…"},
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 182,
    "total_tokens": 196,
    "completion_tokens_details": {"reasoning_tokens": 0}
  }
}

An example reply. Press Run for a live one.

A red circle, a blue square, and a green triangle on a light grey background.
Sample image, 448 × 448 PNG, drawn in your browser. Run sends it. The API takes images as base64 data: URIs (PNG, JPEG, or WebP). The code below reads image.png from disk.
IMAGE_URL="data:image/png;base64,$(base64 < image.png | tr -d '\n')"
printf '%s' '{
  "model": "qwen3.6-35b-a3b",
  "messages": [
    {
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this image?"},
        {"type": "image_url", "image_url": {"url": "'"$IMAGE_URL"'"}}
      ]
    }
  ],
  "max_tokens": 256,
  "reasoning": {"enabled": false}
}' | curl https://infer.industrialdata.ca/v1/chat/completions \
  -H "Authorization: Bearer $INFER_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

Run needs JavaScript. You can copy the code and run it with your own key.

Run calls this site's sandbox with our key; the code above is the call you make with yours.

Responseexample
{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1795795200,
  "model": "qwen3.6-35b-a3b",
  "choices": [{
    "index": 0,
    "message": {"role": "assistant", "content": "A red circle, a blue square, and a green triangle on a light grey background."},
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 282,
    "completion_tokens": 21,
    "total_tokens": 303,
    "completion_tokens_details": {"reasoning_tokens": 0}
  }
}

An example reply. Image tokens count as prompt tokens. Press Run for a live one.

Models

GET /v1/models is the live list of what is served. Make it the first request from a new network: if it fails, chat will fail too.

  • Send data[].id as model, exactly as listed. Models with is_ready: false have no healthy capacity right now.
  • The response is {"data": [...]}, one provider model document per model (schema_version 2.4) with context limits, input modalities, prices, and supported parameters. It is not the OpenAI model object: there is no object or owned_by.
  • GET and HEAD are supported, with an ETag and Cache-Control: public, max-age=30. A request that sends a key or X-Ide-Own-Cores is answered for that caller with Cache-Control: private, no-store. GET /v1/models/{id} is not served.
  • With your key and X-Ide-Own-Cores: only, the list holds only the models your own Cores are serving now. See Your Cores.
List ready model ids
curl -s https://infer.industrialdata.ca/v1/models \
  | jq -r '.data[] | select(.is_ready) | .id'
ModelContextMax outputModalitiesInput / 1MCached / 1MOutput / 1M
Qwen3.6 35B A3Bqwen3.6-35b-a3bContext262kMax output131,072text imageInput / 1M$0.111Cached / 1M$0.075Output / 1M$0.941
Qwen3.8 27Bqwen3.8-27bContext66kMax output32,768text imageInput / 1M$0.269Cached / 1M$0.110Output / 1M$2.321
Gemma 4 31B ITgemma-4-31b-itContext57kMax output28,672text imageInput / 1M$0.219Cached / 1M$0.104Output / 1M$0.458
Nemotron 3.5 Lightning 30B A3Bnemotron-3.5-lightningContext131kMax output65,536textInput / 1M$0.056Cached / 1M$0.025Output / 1M$0.187

Limits are in tokens and rates are in USD per 1,000,000 tokens (reasoning tokens bill at the output rate; per-request fee is $0). All four stream text output and accept tools, JSON mode, structured outputs, and reasoning control. This table is those public chat models, and it matches /billing. GET /v1/models is the live document and can include other rows. Speech to text and text to speech are not in this table. See Audio.

Chat completions

POST /v1/chat/completions takes the OpenAI chat body and returns a chat.completion object with usage. The body must be one JSON object of at most 32 MiB.

  • Send model and a non-empty messages array. Keep system prompts in messages.
  • Only the fields below are accepted. Any other top-level field is 400 unsupported parameter "…", and engine-internal fields such as chat_template, guided_json, or best_of are refused by name.
  • A long request may answer 200 early and send JSON whitespace (newlines) as keepalive until the body is ready. Standard JSON parsers ignore it.

Parameters

modelstring, required
A served id from GET /v1/models. An id that is not served is 404 not_found.
messagesarray, required
Chat messages. content is a string or an array of text and image_url parts (see Images).
streamboolean
Server-sent events. See Streaming.
stream_optionsobject
Only include_usage (boolean). It is forced on when stream is true.
max_tokensinteger
Positive integer, up to the model's max output. max_completion_tokens is accepted as an alias.
temperature, top_pnumber
temperature 0–2, top_p 0–1.
top_k, min_pnumber
top_k integer ≥ −1, min_p 0–1.
presence_penalty, frequency_penaltynumber
−2 to 2. repetition_penalty 0–10.
stopstring or array
One string or up to 4 strings, each at most 256 bytes.
seed, min_tokensinteger
seed any integer. min_tokens 0–4096.
response_formatobject
{"type": "text"}, {"type": "json_object"}, or {"type": "json_schema", "json_schema": {…}} with a schema up to 16 KiB and 12 levels deep.
tools, tool_choicearray, string or object
Up to 64 function tools (64 KiB total). tool_choice is none, auto, required, or a function object. parallel_tool_calls is a boolean.
logprobs, top_logprobsboolean, integer
top_logprobs 0–20. logit_bias takes up to 128 entries, each −100 to 100.
reasoningboolean or object
Turns thinking on or off. See Reasoning. include_reasoning (boolean) is the legacy form, and reasoning_effort is accepted as described there.
chat_template_kwargsobject
enable_thinking (boolean) is the engine switch behind reasoning.
n, userinteger, string
n must be 1. user is a string of at most 128 bytes.

Streaming

Set "stream": true for text/event-stream output. Each data: event is a chat.completion.chunk. Treat each one as a delta, not a full reply.

  • Append choices[0].delta.content in order. Some events carry no text.
  • The last chunk before data: [DONE] carries usage and may have an empty choices array. Guard for it.
  • Lines starting with : (: keepalive) are SSE comments sent while the model is busy. Ignore them.
  • [DONE] is sent only after a normal finish and its usage. A failure mid-stream arrives as a data: event holding an error object, with no [DONE].
  • Closing the connection cancels the generation. Do not retry a half-read stream unless you can restart the whole reply.
Event streamexample
data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Bounded"}}]}

: keepalive

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

data: {"object":"chat.completion.chunk","choices":[],"usage":{"prompt_tokens":18,"completion_tokens":211,"total_tokens":229}}

data: [DONE]
TypeScript
const stream = await client.chat.completions.create({
  model: "qwen3.6-35b-a3b",
  messages,
  stream: true,
});
for await (const chunk of stream) {
  const text = chunk.choices[0]?.delta?.content;
  if (text) process.stdout.write(text);
  if (chunk.usage) console.log("\n", chunk.usage);
}

Images

qwen3.6-35b-a3b, qwen3.8-27b, and gemma-4-31b-it read images. nemotron-3.5-lightning is text only.

  • Send images inline as base64 data URIs: data:image/png;base64,…, image/jpeg, or image/webp.
  • Remote http:// and https:// image URLs are not fetched. They are 400 with image_url must use a data:image/* base64 URI. Download the image yourself and inline it.
  • Audio, video, and file parts in a chat message are not accepted. Neither are SVG or PostScript payloads. Speech uses the routes in Audio, not a chat part.
  • Images count toward the 32 MiB body cap and toward prompt tokens. One request may carry at most 16,384 image tokens.
Images on Cores A Core reads images only when the model it is serving has its image projector loaded. Image requests go only to servers that read images, so a text-only Core, yours or anyone else's, never gets one. With X-Ide-Own-Cores: preferred (the default for a key that can use your Cores), an image request goes to one of your Cores that reads images, else to an image-capable server in the shared pool. With X-Ide-Own-Cores: only, an image for a model your Cores serve as text only is 400 unsupported_modality before anything runs, and nothing is charged. On a Core's local address, an image works only when that Core's model reads images. See Your Cores.
Image request body
{
  "model": "qwen3.6-35b-a3b",
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "What is in this image?" },
      { "type": "image_url", "image_url": { "url": "data:image/png;base64,iVBORw0KGgo…" } }
    ]
  }]
}

Audio

Speech to text and text to speech are not on /billing, and they are not public chat models. Any valid key with credit can call the routes below. An unknown key is 401 and an empty balance is 402. Chat that names either model is 404 model_not_found for every key.

Both models are on the Cores card at /account. While either model is loaded, that Core does not serve chat. The per-key rate limit in Rate limits applies to both routes. Neither route takes a chat capacity slot.

Speech to text

POST /v1/audio/transcriptions takes an OpenAI multipart form and returns JSON. The model you load is nemotron-3.5-transcribe-30b-a4b (Nemotron 3.5 Transcribe 30B A4B). It is not a row of the public GET /v1/models document. With your key and X-Ide-Own-Cores: only, that list shows what your Cores are serving, including this model when one of them has it loaded. The Core's inference app must be 20261126.8 or newer. An older app leaves the model unavailable.

  • The body is multipart/form-data with a file part. JSON is 400. The route reads model and forwards the form. model may be nemotron-3.5-transcribe-30b-a4b, or that id with a vendor prefix such as nvidia/. whisper-1, an empty model, and any other value are served by the transcription model your Cores are serving. When that is Nemotron, those values reach Nemotron.
  • The call runs only on Cores you own. The key must be allowed to use them: Internet: my Cores, a current Sign in with IDE, and you own the Core. You do not need X-Ide-Own-Cores. only, preferred, off, or a missing header all still run only on your Cores. A repeated or unrecognized value is 400. A reply from a Core carries X-Ide-Own-Core: true and X-Ide-Served-By.
  • The upload cap is 32 MiB, about 17 minutes of 16 kHz 16-bit mono WAV. The route also accepts FLAC or MP3. Over the cap is 413. On the public URL the edge may refuse that body before the service, so it is not the JSON envelope. When the route itself refuses the size, the code is audio_too_large.
  • The public route waits 110 seconds after the upload is read. If the Core has not answered, the reply is 413 audio_too_long and the body is JSON. Do not retry it. Ten minutes of audio fits one request.
  • A 200 is the Core's JSON, including text. There is no usage object. Every price on this model is zero, so a completed call costs $0. It still places a hold of 1 nano-USD first, so an empty balance is 402 and nothing runs. The hold is released when the call finishes.
  • 403 own_cores_not_allowed: the key cannot use your Cores or you own none. 409 model_not_loaded: none of your Cores is serving a transcription model this request can use. 409 own_cores_unavailable: your Cores cannot be used for this request right now (see Your Cores).
Transcribe a clip
curl https://infer.industrialdata.ca/v1/audio/transcriptions \
  -H "Authorization: Bearer $INFER_API_KEY" \
  -F "file=@clip.wav" \
  -F "model=whisper-1"

Text to speech

POST /v1/audio/speech takes one JSON object and returns audio. The model you load is phonon-31m-en (Phonon 31M EN). The Core's inference app must be 20261126.10 or newer.

  • model must be phonon-31m-en or gradium/phonon-31m-en. tts-1, an omitted model, and any other id are 400 invalid_request with the message model is not served on this route. An unknown or missing key is 401 before that check runs.
  • input is the text to speak: a non-empty string of at most 4,096 characters. Longer text is 400. response_format may be wav or pcm. Omit it for wav. mp3 and any other format are 400. A voice field does not choose a voice. The model uses its own. The speech server refuses a body over 64 KiB with 413.
  • A 200 is audio/wav, or audio/pcm when you asked for pcm. It is not JSON and it has no usage object, so a completed call settles at 0 tokens and the debit is 0. A hold is taken from the size of the request first, so an empty balance is 402 and nothing runs. phonon-31m-en can appear in GET /v1/models. That listing does not open the route.
  • This route does not use your Cores the way transcription does. It does not check which Cores you own, and the reply does not carry X-Ide-Own-Core. X-Ide-Own-Cores: only is 400 own_cores_unsupported_route. preferred and off are accepted and do not steer the call. The service dials a healthy server for the model, which may not be a Core you own. The reply carries X-Ide-Served-By naming that server.
  • An accepted model id with no healthy server serving it is 404 model_not_found. Nothing is charged and no server is dialled.
Speak a sentence
curl https://infer.industrialdata.ca/v1/audio/speech \
  -H "Authorization: Bearer $INFER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"phonon-31m-en","input":"Bounded retries."}' \
  --output speech.wav

Reasoning

The models think before they answer unless the request turns thinking off. Thinking tokens are completion tokens: they count in usage and are billed.

  • Turn thinking off with "reasoning": {"enabled": false}, "reasoning": false, "reasoning": {"effort": "none"}, or "chat_template_kwargs": {"enable_thinking": false}.
  • "reasoning": {"exclude": true} removes the reasoning trace from the response but leaves thinking on. Usage still counts it.
  • usage.completion_tokens_details.reasoning_tokens is always present on a successful response.
  • With none of reasoning, include_reasoning, or reasoning_effort sent and max_tokens between 1 and 16, thinking is turned off so short probes are not spent inside the trace.
  • Top-level reasoning_effort must be none, minimal, low, medium, high, or xhigh (anything else is 400), and is passed to the engine as-is. It is not an effort dial; use reasoning.
Python, thinking off
completion = client.chat.completions.create(
    model="qwen3.6-35b-a3b",
    messages=[{"role": "user", "content": "Reply with one word."}],
    extra_body={"reasoning": {"enabled": False}},
)

Rate limits

Two limits apply to chat on https://infer.industrialdata.ca/v1. Both answer 429 with Retry-After, and both are safe to retry after that wait. Speech to text and text to speech take the per-key limit and do not take the chat capacity slot. See Audio.

Per keyrate_limit_exceeded
Each key can send a burst of 60 requests, refilled at one request a second. Responses carry x-ratelimit-limit-requests, x-ratelimit-remaining-requests, and x-ratelimit-reset-requests (time until the burst is full again, such as 60s).
Capacityoverloaded
Every slot for that model, or for the whole service, is busy. Retry-After is 1 second. The limit grows and shrinks with the number of healthy servers for that model, so the concurrency figure in /v1/models is a guide, not the live limit.

Embeddings and rerank

POST /v1/embeddings and POST /v1/rerank take the same key, but no model is served on either today, so a call answers 404 model_not_found. A model id that does not belong on that route is 400 first. Check /v1/models before you depend on them.

Your Cores

If you own Cores, a key can send your requests to them, through https://infer.industrialdata.ca/v1 or straight to a Core on your local network. Choose each Core's model on the Cores card at /account.

A key can use your Cores when all of these hold:

  • The key has Internet: my Cores ticked.
  • Your account is linked with Sign in with IDE, and that sign-in is less than 30 days old. When it runs out, sign in with IDE again at /account.
  • You own the Core in your IDE account. A seat on someone else's Core does not count.

X-Ide-Own-Cores

Send this header on POST /v1/chat/completions to choose where the request runs. Any other value, or the header sent twice, is 400 invalid_request. A key with only Internet: my Cores ticked always runs as only, whatever the header says or leaves out, and never on the shared pool.

only
Only your Cores serve the request. If they cannot, it is refused (see below), never sent elsewhere.
preferred
Your Cores first, then the shared pool. This is the default for a key with both Internet boxes ticked.
off
The shared pool only, for a key with both Internet boxes. A key with only Internet: any Core always gets this.
  • When you send preferred or only, a reply from a model server carries X-Ide-Own-Core: true or false. Refusals do not.
  • true means the Core that produced the reply is one of yours: its name is on our list of Cores you own. With an image, it also means the image was read on that Core and not by the shared image reader. false means one of those is not so. Another Core served it, the shared image reader read the image, or the key cannot use your Cores. The header is for your own tracking only. It does not change the price, and it grants nothing. We record the same yes or no with the request.
  • The header is left out when the Core took more than 12 seconds to start replying, because by then the response has already begun. X-Ide-Served-By still names the Core.
  • A request served on your Cores through https://infer.industrialdata.ca/v1 is billed at the same rates as any other.
  • 403 own_cores_not_allowed: the request runs as only, and the key cannot use your Cores or you own none. A key without Internet: my Cores that sends only gets this too.
  • 409 own_cores_unavailable: the request runs as only, and your Cores cannot be used for it right now: they cannot be checked, own-Cores routing is switched off, or you own more than 256 Cores. Retry later, or, with both Internet boxes ticked, send preferred.
  • 409 model_not_loaded: none of your Cores is serving that model. The message names what they are serving, and loaded_models lists those ids.
  • 429 overloaded: every one of your Cores serving that model is busy.
  • 400 unsupported_modality: you sent only with an image, and your Cores serve that model as text only. A Core reads images only when its model's image projector is loaded; see Images.
  • Embeddings, rerank, and text to speech refuse only with 400 own_cores_unsupported_route, and a key with only Internet: my Cores with 409 own_cores_unavailable. Speech to text does not use this header to choose a pool: it always runs on your Cores. See Audio.

On your local network

  • The Host turns on Allow LAN access in the Host portal. Until then the Cores card says that LAN access is off.
  • The Cores card shows each Core's local address, https://<LAN IPv4>:<port>. Use it as the base URL with /v1 appended, and send the same key as a bearer token.
  • A Core answers only under /v1/. GET /v1/models lists only the model that Core is serving. A chat model serves POST /v1/chat/completions. A speech-to-text model serves POST /v1/audio/transcriptions and does not serve chat. A text-to-speech model serves POST /v1/audio/speech and does not serve chat.
  • The Core serves a certificate it made itself, named ide-inference-lan and carrying no IP address, so a client refuses it until you pin or trust that certificate.
  • The Core asks infer.industrialdata.ca whether the key may use it. The rules above apply, and your available balance (your balance less holds for requests in flight) must be above zero. A refused key is 401.
  • Calls to a Core's local address are charged at the same rates as calls through https://infer.industrialdata.ca/v1.
  • A Core that loses its internet connection keeps serving against your last known balance, and the calls it served are charged when it reconnects. Your balance can then end below zero.

Routing

A call to https://infer.industrialdata.ca/v1 passes through Cloudflare, one of two infer edges, and one of two hubs, then runs on one Core. Each reply names that Core in X-Ide-Served-By.

  • Edges. Both edges are checked every 15 seconds. If the active one fails twice in a row, the name moves to the other edge, and it moves back after three good checks.
  • Hubs. Each edge sends to one hub and keeps the other as a backup. If the first hub cannot be reached or answers 502, 503 or 504 before anything has reached you, the edge tries the backup hub once.
  • Which Cores serve. A Core is in the pool when its owner approved it, it checked in during the last 3 minutes, and its model is loaded and ready. The hubs read that list from infer every 5 seconds, signed. If a hub cannot get a fresh list for 120 seconds, it stops using Host Cores until it can.
  • Size of the request. A model can run at more than one context size. A request that fits in 32k tokens goes to the 32k servers first, then the standard ones, then the 256k ones. A larger request goes to the 256k servers first.
  • Choosing a Core. Within a size, the hub picks a healthy Core with room, at most 4 requests in flight each, and prefers the one with the fewest. Requests that share the same start of the conversation go back to the same Core, so its cache is reused. Otherwise the hub takes turns.
  • Your Cores. With preferred, your Cores with room come first, balanced across all of them by the same rules, and then the Cores of other Hosts. With only, the request stays on your Cores. See Your Cores.
  • Failover. If a Core cannot be reached, answers 502, 503 or 504, or has no room left for the prompt, the hub tries the next Core of that size. Under preferred your other Cores come first. When the Cores of that size were busy, it moves on to the next size. This happens only before the first byte reaches you. A stream that breaks midway ends with an error event and is not retried, so retry it yourself.
  • Context length. If a Core refuses the request as too long for its context, the hub tries once more on a larger size, or on another Core. If a larger size was only busy, you get 429 overloaded, because the request may still fit there. Otherwise you get the refusal.
  • Draining. A Core keeps serving its current model while it downloads a new one. When it switches, it stops taking new requests, so they go to other Cores within about a second. It lets requests already running finish, for up to 2 minutes, before it unloads the old model. A Core that goes offline leaves the pool within about a second, and a request streaming from it ends with an error.

Working offline

Local AI on your Cores keeps working when your site loses its internet connection, or when we cannot be reached.

  • The first time a key is used on a Core, the Core asks infer.industrialdata.ca whether the key may use it. The Core then keeps serving a key it has checked for up to 2 days offline while its copy of your wallet lasts, and settles with us when it is back online. A yes never lasts past the end of your Sign in with IDE.
  • A key the Core has not seen yet cannot be checked while offline, so it is refused until the connection is back.
  • The kept answers are held in memory, so they last only while the Core stays on. A Core that restarts while offline must reach our control plane again for attestation, our check that it is a genuine Core, before it accepts keys. It then asks about each key again. This is known and intended.
  • The trade-off: a key you revoke or delete can keep working on your local network until that Core's kept yes runs out, which takes up to 2 days. If a key leaks, revoke it at /account and expect this delay on the LAN. The public endpoint stops accepting it within a few seconds.
  • A Host can ask us in writing for a longer window. Email support@industrialdata.ca from the account's address and name the Cores and the window you need. A longer window is not built yet. We would build it on request.

Balancing on your local network

Your Cores on one site work as one pool. Call any Core's local address, and the request runs on whichever of your Cores serves the model and has room. This works offline too.

  • Any Core is a way in. Use any Core's local address as the base URL. With balancing, its GET /v1/models lists every model your Cores on that site are serving. This replaces the one-model list described under On your local network.
  • Who is in the pool. infer tells each Core which of your other Cores share its site, and what each one serves. Each Core checks the others about once a minute, so it knows which are up and how busy they are.
  • Choosing a Core. The Core you called serves the request itself when it runs that model and has room. Otherwise it passes the request to the least busy of your Cores that serves the model.
  • Failover. If that Core cannot be reached or is busy before the first byte, the request goes to the next one. A stream that breaks midway ends with an error and is not retried. If none of your Cores serves the model, you get 409 model_not_loaded with loaded_models. If they are all busy, you get 429 overloaded with Retry-After.
  • One check, one record. The Core you called checks your key once, and the request is recorded once in your activity log, whichever Core served it. LAN calls are charged at the same rates as calls through https://infer.industrialdata.ca/v1. A request is passed on at most once, between your own Cores only, over an encrypted link that only those Cores can use.
  • Offline. Balancing needs only your local network. Keys work by the rules in Working offline.
  • X-Ide-Served-By names the Core that served the request.

Prepaid balance

Usage is paid from a prepaid USD balance on your account. Current per-model rates are on /billing.

  • Top up at /billing through Stripe Checkout, by credit pack or in dollars. Receipts are listed on the same page.
  • A promo code adds a fixed amount once. Follow Enter promo code on /billing to /promo-enter and enter it there.
  • Before the model runs, the API places a hold on your balance sized from the estimated prompt and max_tokens, capped at what you have available. Holds from your other in-flight requests count against the balance.
  • If what is available cannot cover the estimated prompt, the request is refused with 402 Payment Required and code wallet_balance_exhausted. No model runs and nothing is charged.
  • When the response completes, the actual usage is debited and the hold is released. A request that ends in an error before it completes is not charged.
402 responseexample
{
  "error": {
    "message": "Prepaid inference wallet balance is exhausted.",
    "type": "billing_error",
    "param": null,
    "code": "wallet_balance_exhausted"
  }
}

Metering

Each completed request is priced from the usage object the API returns to you, so you can reproduce every debit.

Wallet balances and per-request charges are settled in nano-dollars (nano-USD), so a fraction of a cent still has an exact ledger balance. One US dollar is 1,000,000,000 nano-USD. Each token term below is rounded half-to-even to a whole nano-USD. Pricing pages show ordinary US dollars; this section is the customer-facing description of that unit.

prompt_tokens
Input tokens, including image tokens.
prompt_tokens_details.cached_tokens
The part of the prompt served from cache, billed at the cached-prompt rate. Absent means 0.
completion_tokens
Output tokens, including reasoning.
completion_tokens_details.reasoning_tokens
The part of the output spent thinking, billed at the reasoning rate.
request fee
Currently 0 nano-USD across all public models.
Cost of one requestformula
cost_nano_usd =
    (prompt_tokens - cached_tokens)        x prompt_rate
  + cached_tokens                          x cached_prompt_rate
  + (completion_tokens - reasoning_tokens) x completion_rate
  + reasoning_tokens                       x reasoning_rate
  + request_fee

# rates are nano-USD per 1,000,000 tokens; 1 USD = 1,000,000,000 nano-USD
# each token term is rounded half-to-even to a whole nano-USD

Cached and reasoning tokens are subsets of their parent counts, so each token is billed once. The rates for each model are on /billing.

Errors

Errors use the OpenAI envelope {"error": {"message", "type", "param", "code"}} with Content-Type: application/json. Branch on the HTTP status and error.code, not on the message.

Statuserror.codeMeaning
400invalid_request, unsupported_modality, own_cores_unsupported_routeNot a JSON object, an unsupported or blocked field, a value out of range, a remote image URL, an image for a model that does not read images (or, with X-Ide-Own-Cores: only, that your Cores serve as text only), a model id sent to embeddings, rerank, or text to speech that does not belong there (including tts-1 and an omitted model on POST /v1/audio/speech), or a bad X-Ide-Own-Cores value. Fix the request.
401invalid_api_keyMissing, unknown, or revoked key. Check /account.
402wallet_balance_exhaustedThe prepaid balance cannot cover the request. Checked before the model runs. Top up at /billing.
403key_has_no_access, key_not_allowed_externalkey_has_no_access: the key has none of Local LAN, Internet: any Core, or Internet: my Cores ticked. key_not_allowed_external: the key has only Local LAN, so it cannot call https://infer.industrialdata.ca/v1. Turn the setting on for the key at /account. See API keys.
403own_cores_not_allowedThe request runs as X-Ide-Own-Cores: only (you sent it, the key has only Internet: my Cores, or you called POST /v1/audio/transcriptions), and the key cannot use your Cores or you own none. See Your Cores.
404not_found, model_not_foundThe path is not served (for example /v1/completions or GET /v1/embeddings), or the model id is not served. Embeddings, rerank, and text to speech say model_not_found when no healthy server is serving the model. Chat naming an audio model is model_not_found for every key. See Audio.
409model_not_loaded, own_cores_unavailablemodel_not_loaded: the named model is not loaded on your Cores (with X-Ide-Own-Cores: only or on POST /v1/audio/transcriptions) or on the Core you called. The message says which model is loaded, and loaded_models lists those ids. Use a listed id, or choose a model at /account. Do not retry. own_cores_unavailable: your Cores cannot be used for this request right now (see Your Cores); retry later, or on chat with both Internet boxes ticked send preferred.
413audio_too_large, audio_too_long, or noneThe body is over 32 MiB (or over 64 KiB on POST /v1/audio/speech, where the speech server returns JSON with code: null). On https://infer.industrialdata.ca the edge refuses bodies over 32 MiB before the service, so the body is not the JSON envelope. When the transcription route itself refuses the size, the code is audio_too_large and the body is JSON. A transcription that does not finish within 110 seconds of the upload is audio_too_long, also JSON. Do not retry a 413.
429rate_limit_exceeded, overloadedThe key's rate limit, or no free capacity. See Rate limits. Wait for Retry-After, then retry.
502upstream_error, upstream_generation_error, invalid_upstream_response, missing_usageThe model server failed or returned an incomplete response. Not charged. Retry with backoff.
503service_unavailableThe image encoder is not ready for an image request. Retry with backoff.
503, 504noneThe edge could not reach the service; the body is not the JSON envelope. A busy engine is reported as 429, not 503. Retry with backoff.
  • Do not retry 400, 401, 402, 403, 404, 409 model_not_loaded, or 413. Retry 429, 5xx, and 409 own_cores_unavailable only.
  • Use capped exponential backoff with jitter. Cap attempts at four.
Retry policy
// Retry only transient failures; honour Retry-After, cap attempts, add jitter.
const retryable = new Set([429, 500, 502, 503, 504]);
if (!retryable.has(response.status) || attempt >= 4) throw error;
const retryAfterMs = Number(response.headers.get("retry-after") ?? 0) * 1000;
const backoffMs = Math.min(8_000, 250 * 2 ** attempt) * (0.5 + Math.random());
await new Promise((resolve) => setTimeout(resolve, Math.max(retryAfterMs, backoffMs)));

Clients

Any client that speaks OpenAI Chat Completions works. Set the base URL to https://infer.industrialdata.ca/v1, the API key to your ide_sk_ key, and the model to an exact id from GET /v1/models. None of these run the model on your computer.

  • When a client asks for an API format or wire protocol, select Chat Completions (POST /v1/chat/completions). Clients configured for the OpenAI Responses API (POST /v1/responses) will receive 404 not_found.
  • Enable native tool calling on all four public models, and vision / image input on qwen3.6-35b-a3b, qwen3.8-27b, and gemma-4-31b-it (on a Core only when its image projector is loaded; see Images).

Visual Studio 2026

Bring Your Own Model (BYOM) is generally available in Visual Studio 2026 version 18.12 and later across Community, Professional, and Enterprise, with no GitHub sign-in required. See the Visual Studio blog and the 18.12 release notes.

  1. Open GitHub Copilot Chat, open the model picker, and choose Manage models.
  2. Select Add model provider and choose Custom Endpoint (on 18.10–18.11, select OpenAI with a custom URL, as described in Using AI models in Copilot Chat).
  3. Enter https://infer.industrialdata.ca/v1 as the endpoint URL, paste your ide_sk_… API key, and set Model API format to Completions.
  4. Add a served model id such as qwen3.6-35b-a3b, enable tool calling (and vision for image-capable models), then select it in Agent Mode or Chat.

Visual Studio Code

Run Chat: Manage Language Models from the Command Palette, choose Add Models → Custom Endpoint → Chat Completions, or add an entry to chatLanguageModels.json (VS Code custom endpoint docs):

chatLanguageModels.json
[
  {
    "name": "Industrial Data Infer",
    "vendor": "customendpoint",
    "apiKey": "${input:inferApiKey}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "qwen3.6-35b-a3b",
        "name": "Qwen3.6 35B A3B",
        "url": "https://infer.industrialdata.ca/v1/chat/completions",
        "toolCalling": true,
        "vision": true,
        "maxInputTokens": 196608,
        "maxOutputTokens": 65536
      }
    ]
  }
]

Terminal agents

For OpenCode, export INFER_API_KEY and declare an OpenAI-compatible provider in opencode.json:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "infer/qwen3.6-35b-a3b",
  "providers": {
    "infer": {
      "name": "Industrial Data Infer",
      "env": ["INFER_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://infer.industrialdata.ca/v1"
      },
      "models": {
        "qwen3.6-35b-a3b": {
          "name": "Qwen3.6 35B A3B"
        }
      }
    }
  }
}

For Aider, prefix the model id with openai/ so LiteLLM routes to OPENAI_API_BASE:

Shell
export OPENAI_API_BASE="https://infer.industrialdata.ca/v1"
export OPENAI_API_KEY="ide_sk_your_key"
aider --model openai/qwen3.6-35b-a3b
Before you blame the client Run curl -s https://infer.industrialdata.ca/v1/models from the same machine. A 200 means the network path works; then check the key and the exact model id.