Models & context limits

Discover model IDs, numeric context limits, output caps, and current published pricing.

API guide · Reviewed 11 October 2026

Discover models

List models · no authentication required
curl --fail-with-body https://formalengines.com/inference/v1/models

curl --fail-with-body \
  https://formalengines.com/inference/v1/models/deepseek-v4-1-flash

Use data[].id exactly as returned in your request. For example: deepseek-v4-1-flash, deepseek-v4-pro, or kimi-k3. The model catalog provides a readable pricing comparison.

MetadataMeaning
context_lengthPositive integer token count for the advertised context window
max_output_tokensAdvertised maximum output budget; individual routes can enforce lower limits
pricingPublished base rates and billing policy, not your personalized account quote
price_revisionRevision of the model’s operator-managed pricing

Budget the full request

Conversation text, tool definitions, and the requested output budget all consume context. A large max_tokens reservation can cause an overflow even when the input alone fits. Display labels such as “1M” are rounded; use the numeric metadata for planning.

The gateway serves the model. Your application or agent is responsible for reducing history, summarizing older turns, trimming tool output, and choosing a feasible output budget. On context_length_exceeded, adjust the request before retrying. Repeating the unchanged request will not fix the overflow.

Configure an agent or custom client

SettingValue
Provider typeOpenAI-compatible / custom
Base URLhttps://formalengines.com/inference/v1
API keyYour full Formal Engines key
ModelAn exact public model ID from GET /models

If an agent supports automatic context discovery, let it read the model endpoint. Existing sessions may retain a cached limit or an explicit override. Recheck that setting after changing models. Agent compression is lossy; keep essential structured state outside conversation summaries when exact retention is required.

Need a hand? Contact support with your request ID. Keep your API key private.