# Llama 3.1 8B Instruct - Core.Today AI API > Meta's Llama 3.1 8B instruction-tuned model served through OpenRouter - a fast, efficient small open-weight model with 131K-token context for high-volume, low-cost workloads. This id replaces the retired direct llama-3.1-8b-instant route. Billed at OpenRouter's actual usage cost. - **Provider**: Meta - **Model ID**: meta-llama/llama-3.1-8b-instruct - **Category**: LLM - **Credits**: 0.1 per 1K tokens (avg, estimate) - **Speed**: Fast - **Quality**: Standard ## Model Specifications - **Context Window**: 131K tokens - **Max Output**: 131K tokens - **Training Cutoff**: 2023-12 - **Supported Formats**: text, json, markdown - **Compatible SDK**: OpenAI ### Capabilities - Function Calling - Streaming - JSON Mode - System Prompt ### Token Pricing (per 1M tokens) - **Input Tokens**: 92.9 credits ($0.06) - **Output Tokens**: 148.64 credits ($0.10) - **Cached Tokens**: 46.45 credits ($0.03) ## Features - 131K-token context window - Fast, efficient 8B open-weight model with very low per-token cost - OpenAI-compatible API (chat completions) via /llm/openrouter/v1 - Tool calling and structured JSON output - Billed at OpenRouter's actual usage.cost - listed rates are estimates ## Use Cases - High-volume classification, extraction and routing - Lightweight chatbots and FAQ assistants - Cheap first-pass drafts and summaries ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/openrouter/v1/chat/completions ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **model**: string - Model ID in vendor/model form, e.g. "meta-llama/llama-3.1-8b-instruct". - **messages**: array - Chat messages in OpenAI format (system/user/assistant roles). ### Optional - **temperature**: number (default: 0.7) - Sampling temperature (0-2). - **max_tokens**: integer (default: 2048) - Maximum completion tokens. - **stream**: boolean (default: false) - Stream the response as server-sent events. ## Examples ### Chat completion OpenAI-compatible chat completion request via OpenRouter ```json { "model": "meta-llama/llama-3.1-8b-instruct", "messages": [ { "role": "user", "content": "Summarize the attached report in 5 bullets." } ], "max_tokens": 1024 } ``` ## Response Format ```json { "id": "chatcmpl-abc123", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Response text here" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150 } } ``` ## Tips - Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/openrouter/v1 - Charged at OpenRouter's usage.cost x 1,858 credits/USD - the listed rates are estimates and may lag OpenRouter price changes - Use this OpenRouter id instead of the direct route - the direct llama-3.1-8b-instant route (/llm/groq/v1) is retired and returns 503 ## Documentation https://openrouter.ai/meta-llama/llama-3.1-8b-instruct