Inference API
The Inference API lets your developers point a coding tool at Gravity Rail's models. Use Claude Code, OpenCode, Cursor, Continue or any OpenAI-compatible client. Every call is billed to your organization at your plan rates, and the models run under your Gravity Rail agreement.
Prerequisites
- Organization Owner or Admin role in Gravity Rail
- A configured sign-in verification method
Create a key
- Open your Organization and select Inference API under Settings.
- Enter an optional key name and select Create key.
- Verify your sign-in, then copy the key. Use the raw value, the
.envassignment or the shell export. Store it securely. The page only displays the full key when you create it.
The API keys list shows the name and prefix of each key. The old workspace URL returns HTTP 404. Replace a workspace key with a new organization key and update the base URL in your tool.
To revoke an organization Inference API key, open API Keys in organization settings and match the key name and prefix.
Connect your tool
Pick a model above the snippet. The default is Claude Sonnet 5.5. Set GR_INFERENCE_API_KEY to the new key, then copy the snippet for your tool.
- Claude Code uses the Anthropic Messages endpoint.
- OpenCode reads the provider block from
OPENCODE_CONFIG_CONTENT. - OpenAI SDK and other clients use the OpenAI-compatible base URL.
Data use
Follow your organization's data disposition when submitting content. Gravity Rail uses BAA-covered, zero-data-retention model connections for every organization. If your organization enables PHI, you can keep using your existing models and keys.
Choose what the API may spend
The API spending setting applies to every Inference API key in the organization.
- Plan credits only (the default) — API calls stop when this period's plan credits are spent. Purchased credits are not used.
- Allow overage credits — API calls may use purchased credits after the plan credits run out. The balance can go below zero when your subscription allows extra usage.
A call that cannot be funded is refused with a message your tool can show. Chat usage on the platform is not affected by this setting.
Check usage
The page shows this period's credits, tokens and requests, and the last six months of history. To see every charge, select View full bill.
Models
The page lists the models the API serves, with each model's credits per 1,000 tokens. One credit costs $0.01. A call is priced from the same rates as the rest of your plan.
Related
- Organization API Keys — Revoke an Inference API key from organization settings
- Billing — Review the organization subscription, credits, and the full bill