Inference
A hosted service with its own key and prices. This page lists the addresses it answers, the facts its documentation states, and the setup of each harness.
Addresses and facts
- OpenAI Chat Completions:
https://inference.net/v1models.dev, read
- Authentication
- Authorization: Bearer, with the key in
INFERENCE_API_KEYmodels.dev, read - Structured output
- Unknown
- Tool calling
- 8 of 9 listed models The share of this provider's models that models.dev records with tool calling. models.dev, read
- Rate limits
- Unknown
- Prices
- Unknown
- Data retention
- Unknown
- Documentation
- Read the page models.dev, read
- Output limits Baltor recorded
- Unknown
Harness setup
Replace google/gemma-3 with the model you want.
OpenCode
Put this in opencode.json in your project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"inference": {
"npm": "@ai-sdk/openai-compatible",
"name": "Inference",
"options": {
"baseURL": "https://inference.net/v1",
"apiKey": "{env:INFERENCE_API_KEY}"
},
"models": {
"google/gemma-3": {
"name": "google/gemma-3"
}
}
}
}
}- OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.
From OpenCode documentation, read .
Pi
Put this in ~/.pi/agent/models.json:
{
"providers": {
"inference": {
"baseUrl": "https://inference.net/v1",
"api": "openai-completions",
"apiKey": "$INFERENCE_API_KEY",
"models": [
{
"id": "google/gemma-3"
}
]
}
}
}- The apiKey field can name an environment variable as $NAME.
From Pi documentation, read .
Codex
Codex speaks only the Responses API, and Inference documents no Responses address. A gateway that offers one can sit in between.
- Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.
From Codex documentation, read .
Claude Code
Claude Code sends Anthropic Messages requests, and Inference documents no such address. A gateway that translates to that API can sit in between.
- Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.
From Claude Code documentation, read .
Models it lists
Prices in US dollars per million tokens, input and output, as models.dev, read records them.
| Model | Input | Output | Context | As of |
|---|---|---|---|---|
Google Gemma 3 google/gemma-3 | 0.150 USD | 0.300 USD | 125,000 | older than 30 days |
Llama 3.1 8B Instruct meta/llama-3.1-8b-instruct | 0.025 USD | 0.025 USD | 16,000 | older than 30 days |
Llama 3.2 11B Vision Instruct meta/llama-3.2-11b-vision-instruct | 0.055 USD | 0.055 USD | 16,000 | older than 30 days |
Llama 3.2 1B Instruct meta/llama-3.2-1b-instruct | 0.010 USD | 0.010 USD | 16,000 | older than 30 days |
Llama 3.2 3B Instruct meta/llama-3.2-3b-instruct | 0.020 USD | 0.020 USD | 16,000 | older than 30 days |
Mistral Nemo 12B Instruct mistral/mistral-nemo-12b-instruct | 0.038 USD | 0.100 USD | 16,000 | older than 30 days |
Osmosis Structure 0.6B osmosis/osmosis-structure-0.6b | 0.100 USD | 0.500 USD | 4,000 | older than 30 days |
Qwen 2.5 7B Vision Instruct qwen/qwen-2.5-7b-vision-instruct | 0.200 USD | 0.200 USD | 125,000 | older than 30 days |
Qwen 3 Embedding 4B qwen/qwen3-embedding-4b | 0.010 USD | 0 USD | 32,000 | older than 30 days |
Sources of this page
- models.dev/api.json, read
Paid links
No link in this directory is a paid link or an ad, and no listing is paid for. The order and the contents of every list come from the sources named on this page.