TensaHub › NVIDIA NIM

NVIDIA NIM · meta/llama-3.1-8b-instruct

API for the model meta/llama-3.1-8b-instruct at NVIDIA NIM, pricing at the provider. curl, Python and JavaScript samples, live testing.

Test and rate in the catalog

Free access for prototyping.

Type
Model
Provider
NVIDIA NIM
Model ID
meta/llama-3.1-8b-instruct
Pricing
Free + paid
Keyless access
No
Key variable
NVIDIA_API_KEY
Base URL (OpenAI-compatible)
https://integrate.api.nvidia.com/v1
Inputs
Text
Developer rating
Not rated yet
Documentation
https://build.nvidia.com/models

Code samples

cURL

curl https://integrate.api.nvidia.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NVIDIA_API_KEY" \
  -d '{"model":"meta/llama-3.1-8b-instruct","messages":[{"role":"user","content":"Hello, introduce yourself in one sentence."}]}'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://integrate.api.nvidia.com/v1", api_key=os.environ["NVIDIA_API_KEY"])
r = client.chat.completions.create(
    model="meta/llama-3.1-8b-instruct",
    messages=[{"role": "user", "content": "Hello, introduce yourself in one sentence."}],
)
print(r.choices[0].message.content)

JavaScript

// npm install openai
import OpenAI from 'openai'

const client = new OpenAI({ baseURL: 'https://integrate.api.nvidia.com/v1', apiKey: process.env.NVIDIA_API_KEY })
const r = await client.chat.completions.create({
  model: 'meta/llama-3.1-8b-instruct',
  messages: [{ role: 'user', content: 'Hello, introduce yourself in one sentence.' }],
})
console.log(r.choices[0].message.content)

Generate the integration code →

Popular searches

Frequently asked questions

Is the NVIDIA NIM · meta/llama-3.1-8b-instruct API free?

NVIDIA NIM · meta/llama-3.1-8b-instruct offers a limited free tier; beyond it, usage is paid.

How do I call NVIDIA NIM · meta/llama-3.1-8b-instruct from my code?

NVIDIA NIM · meta/llama-3.1-8b-instruct exposes an OpenAI-compatible API at https://integrate.api.nvidia.com/v1: use any OpenAI SDK (Python, JavaScript…) with this base URL. Model identifier: meta/llama-3.1-8b-instruct. Ready-to-use code (streaming, JSON, retries) is available in the developer toolkit.

What are the alternatives to NVIDIA NIM · meta/llama-3.1-8b-instruct?

Similar APIs listed in the catalog: Meta: Muse Ember, Meta: Muse Spark Open, Meta: Muse Wonder, Meta: Muse Spark 1.3 Contributor, Meta: Muse Spark 1.3.

Alternatives