Skip to content

API

Change the base URL. Nothing else.The intelligence on the other end has no owner.

The gateway speaks the shape your client already speaks. What differs is behind it: an open validator set, public weights, and an attestation for every answer.

Base URL
https://inference.opgein.com/v1
Version
2026-05-01
Phase
Phase 1 · Language surface

The drop-in

One line is different.Your code does not know it moved.

There is no key to request. Phase 1 runs a free public endpoint and counts its budget per gateway rather than per key, so a client that insists on an apiKey field may send any non-empty string.

import OpenAI from "openai";  // Kimi, Qwen and OGI all speak thisconst client = new OpenAI({  // was: https://api.moonshot.ai/v1  baseURL: "https://inference.opgein.com/v1",  apiKey: process.env.OGI_API_KEY,});const completion = await client.chat.completions.create({  model: "ogi-language-1",  messages: [    { role: "user", content: "Who owns the machines that think?" },  ],});console.log(completion.choices[0].message.content);
Moonshot AI

Four endpoints.Everything they report is defined in the codex.

One of them answers queries. The other three are the network describing itself: who is serving, what it has been asked, and what the chain has recorded.

POST/chat/completions

One query, answered by one validator.

Returns a chat.completion. With stream: true the same completion arrives as server-sent events, paced to the latency the response reports.

GET/models

The surface catalogue, serving and dark.

Every surface the codex specifies, each with its status, the phase that activates it, the tiers eligible to serve it and the checkpoint registered against it.

GET/network/status

Fleet, settlement and phase, as of the hour.

Validator counts by tier, stake, the current slot and epoch, the token's programs, and the roadmap phase the network is in.

GET/usage

The trailing window, bucketed by hour.

Requests, tokens, latency percentiles, the audit sample and what it found, broken down per surface.

Capability is split into surfaces.Each one is registered, or it is dark.

3 of 8 surfaces accept a request today. The rest are specified in the codex and listed here with the phase that activates them — a surface is never implied to exist before it does.

ModelStatusContextMax outputTiersPhase
ogi-language-1OGI Language 1active131,0728,192standard, heavy, cluster1
ogi-language-1-distillOGI Language 1 Distillactive32,7684,096light, standard, heavy, cluster1
ogi-vision-1OGI Vision 1canary32,7684,096standard, heavy, cluster2
ogi-multimodal-1OGI Multimodal 1planned65,5364,096heavy, cluster2
ogi-reasoning-1OGI Reasoning 1planned65,5368,192heavy, cluster3
ogi-memory-1OGI Memory 1planned131,0722,048light, standard, heavy3
ogi-manipulation-1OGI Manipulation 1planned16,3841,024heavy, cluster4
ogi-locomotion-1OGI Locomotion 1planned8,192512heavy, cluster4

Tiers are hardware classes, not price plans: light (Single consumer GPU, 24GB+), standard (Single consumer/prosumer GPU, 32GB+), heavy (Single data-center GPU, 80GB), cluster (Multi-node, high-bandwidth interconnect). A surface is served only by the tiers that can hold it.

The envelope

Every answer says who produced it.Nothing here has to be taken on trust.

Alongside the OpenAI-shaped body, a completion carries the validator that ran the forward pass, the pool it was drawn from, the attestation it signed, and whether this query was one of the copies dispatched to a second validator for comparison.

x-ogi-request-id
One per request, echoed on every response and every error. Quote it and the job can be found.
x-ogi-gateway
Which gateway instance answered. Stable within the hour, so traces group.
x-ogi-api-version
The surface version you are pinned against. Currently 2026-05-01.
x-ogi-settlement-chain
Where the attestation lands. solana.
x-ratelimit-*
Limit, remaining and reset. Counted per gateway, not per key.
"ogi": {  "validator": { "id": "val_8BT7oFy7KP5", "tier": "heavy" },  "routing": { "eligible_validators": 180 },  "attestation": {    "signed_by_validator": true,    "batched_on_chain": false,    "settles_on": "solana"  },  "audit": { "sample_rate": 0.03, "sampled": false },  "price": { "billed_to_caller": 0, "funded_by": "treasury" }}

Settlement is touched once, at the end of the period, when attestations are batched on-chain and the validators that produced them are credited. That is why batched_on_chain is false while you are reading the response: the job is signed, not yet settled.

Refusals name their reason.A dark surface is not an outage.

Errors come back in the same envelope as answers, with a param pointing at the field that caused them.

CodeStatusWhen
model_not_found404The id is not in the surface catalogue.
model_not_active400The surface is specified but dark. The body names the phase that activates it.
missing_required_parameter400model or messages absent.
invalid_type400A field is the wrong type. param names it.
value_out_of_range400max_tokens above the surface's ceiling, or temperature outside 0–2.
invalid_json400The body did not parse.
internal_error500Retry with the same request id attached.

The age of renting intelligence is ending.The age of owning it is beginning.