Llama 3.1 8b Instruct API
Run nim/meta/llama-3.1-8b-instruct through FastInfra's OpenAI-compatible API.
Pay per token, no subscription, routed to the cheapest available provider.
Llama 3.1 8b Instruct pricing
Billed per token used. Prices sync automatically from wholesale providers.
| Direction | Price per 1M tokens |
|---|---|
| Input | $0.05 |
| Output | $0.08 |
Served by 2 providers
Requests route to OpenRouter by default (cheapest).
Pin a specific provider with the :provider suffix.
| Provider | Upstream model ID |
|---|---|
| openrouter | meta-llama/llama-3.1-8b-instruct |
| together | nim/meta/llama-3.1-8b-instruct |
Call Llama 3.1 8b Instruct in 30 seconds
Works with any OpenAI SDK — change the base URL and API key only.
Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.fastinfra.ai/v1")
response = client.chat.completions.create(
model="nim/meta/llama-3.1-8b-instruct",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
curl
curl https://api.fastinfra.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nim/meta/llama-3.1-8b-instruct",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Llama 3.1 8b Instruct — common questions
How much does the nim/meta/llama-3.1-8b-instruct API cost?
On FastInfra, nim/meta/llama-3.1-8b-instruct costs $0.0525/1M input, $0.084/1M output tokens. Billing is per token used, with no subscription.
Is nim/meta/llama-3.1-8b-instruct compatible with the OpenAI SDK?
Yes. FastInfra exposes nim/meta/llama-3.1-8b-instruct through an OpenAI-compatible endpoint at https://api.fastinfra.ai/v1 — point any OpenAI SDK at that base URL with a FastInfra API key and keep your existing code.
Which providers serve nim/meta/llama-3.1-8b-instruct?
nim/meta/llama-3.1-8b-instruct is available from 2 provider(s): openrouter, together. Requests route to OpenRouter by default (cheapest); append ":provider" to the model ID to pin one.
Related models
Compare side by side: Llama 3.1 8b Instruct vs Llama3.1:8b · Llama 3.1 8b Instruct vs Llama3.2:1b · Llama 3.1 8b Instruct vs Llama3.2:3b