Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt

Use this file to discover all available pages before exploring further.

LiteLLM supports calling 100+ LLMs using the OpenAI Input/Output Format. LiteLLM documentation
LiteLLM + Nebius Token Factory documentation

Prerequisites

  1. Create an API key to authorize requests to Nebius Token Factory.
  2. Save the API key into a NEBIUS_API_KEY environment variable:
    export NEBIUS_API_KEY="<API_key>"
    
  3. Install the litellm package:
    pip install litellm
    

Create a chat completion

Paste the following code into your script:
from litellm import completion

response = completion(
    model="nebius/meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of Netherlands?",
        }
    ],
    temperature=0.1,
)

print (response.choices[0].message.content)
Checkout an example notebook in our cookbook repository.