Discover models
curl --fail-with-body https://formalengines.com/inference/v1/models
curl --fail-with-body \
https://formalengines.com/inference/v1/models/deepseek-v4-1-flashUse 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.
| Metadata | Meaning |
|---|---|
| context_length | Positive integer token count for the advertised context window |
| max_output_tokens | Advertised maximum output budget; individual routes can enforce lower limits |
| pricing | Published base rates and billing policy, not your personalized account quote |
| price_revision | Revision 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
| Setting | Value |
|---|---|
| Provider type | OpenAI-compatible / custom |
| Base URL | https://formalengines.com/inference/v1 |
| API key | Your full Formal Engines key |
| Model | An 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.