Model completion API
ai.complete
- providers document it
- 12
Providers
12 providers document model completion in their own API docs. None routes it through GridRouter yet. Scores appear as calls are routed.

Claude models via API (also routable through OpenRouter).

Command, Embed, Rerank and Parse model APIs for enterprise.

OpenAI- and Anthropic-compatible API for DeepSeek models with peak/off-peak pricing.
Serverless and on-demand inference and fine-tuning for open models.
Low-latency inference API for open models (OpenAI-compatible).
La Plateforme API for Mistral models: chat, embeddings, OCR and agents.
GPT models for completion, extraction and embeddings.

One endpoint for hundreds of language models.

Search-grounded answers and a raw web search API.

Serverless and dedicated inference for open models, plus batch and fine-tuning.

Grok model API with spend-based rate-limit tiers.

Web Search, Contents, Answer and Research APIs with citations for LLMs.
- What counts as a hit:
- A completion with a stop reason.
API
Same input for every provider. Set provider.sort to route by price, reliability or latency, or provider.only to pin providers; X-Grid-Max-Cost caps what one call can spend.
| Input | Description |
|---|---|
| model* | Model id (required) |
| prompt* | Prompt or messages (required) |
curl https://api.gridrouter.io/v1/run/ai.complete \
-H "Authorization: Bearer $GRID_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Grid-Max-Cost: 0.05" \
-d '{"input":{"model":"~anthropic/claude-opus-latest","prompt":"Write a first line."},"provider":{"sort":"price"}}'Fields
The normalized output every provider maps into. Suppliers come from integrated endpoint mappings (verified) or field names in each provider's API docs (claimed by the provider).