Skip to main content

Start building now

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokenfactory.nebius.com/v1/",
    api_key=os.environ.get("NEBIUS_API_KEY")
)

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-R1-0528",
    messages=[
        {
            "role": "system",
            "content": """You are a helpful assistant"""
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": """hello"""
                }
            ]
        }
    ]
)

print(response.to_json())
  1. Go to https://tokenfactory.nebius.com, create an account
  2. Log in using your Google or GitHub account
  3. For authentication, get an API key
To explore code examples and get reusable snippets, explore our official cookbook with solutions, examples and demo apps:https://github.com/nebius/token-factory-cookbook

Explore

Nebius Token Factory is your all-in-one platform for working with large language models (LLMs) — from quick experimentation to production deployment. Test and compare models in an intuitive playground, or integrate them into your applications via an OpenAI-compatible API for inference and fine-tuning, and extend capabilities through seamless integrations with popular frameworks.

Inference

Send requests such as prompts, chats or images, and get responses

Third-party integrations

Build inference into applications that are based on supported third-party integrations

Fine-tuning

Train models by using datasets to increase output accuracy, enhance model reliability and save costs on prompting

API

Learn how to authenticate and make requests to the inference API