Skip to content
Help guide the future of agentgateway — Take the survey

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Nebius Token Factory

Page as Markdown

Route agentgateway LLM traffic to models served by Nebius Token Factory.

Configure Nebius Token Factory as an LLM provider in agentgateway. The nebius provider sends Chat Completions and Embeddings requests to Nebius.

Configuration

You can add the model in the UI or in your configuration file.

To add the model in the UI, follow these steps. The steps create the same model as the Config file tab.

  1. Set your API key in the NEBIUS_API_KEY environment variable. The UI checks that the variable exists when you save the model.

    export NEBIUS_API_KEY='<your-api-key>'
  2. Create a configuration file with an empty llm section, and start agentgateway in the same terminal. Without an llm section, the UI does not show the LLM > Models page.

    cat > config.yaml <<'EOF'
    # yaml-language-server: $schema=https://agentgateway.dev/schema/config
    llm:
      models: []
    EOF
    agentgateway -f config.yaml
  3. Open LLM > Models, such as http://localhost:15000/ui/llm/models, and click Add model.

  4. From the Provider dropdown, select Nebius Token Factory.

  5. Keep the default nebius/* in the Incoming model match field.

  6. For the Provider API key, select Env var, and enter NEBIUS_API_KEY.

  7. For Outgoing model, keep Strip nebius/. This option removes the nebius/ prefix before the request is forwarded. To send every request to one model instead, select Explicit, and enter the model name. This option sets params.model.

  8. Click Save model.

The form has no field for params.baseUrl. To override the base URL, click the Raw icon (<>) in the drawer header and add the field, or use the Config file tab.

Whether the UI can save depends on your storage mode. For more information, see Save changes from the UI.

Example requests

After running agentgateway with the configuration from the previous section, you can send an OpenAI-compatible request to the v1/chat/completions endpoint:

curl -X POST http://localhost:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nebius/openai/gpt-oss-120b",
    "messages": [{"role": "user", "content": "Hello from Nebius!"}]
  }'

To create embeddings, send a request with a Nebius embedding model to the v1/embeddings endpoint:

curl -X POST http://localhost:4000/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nebius/Qwen/Qwen3-Embedding-8B",
    "input": "Hello from Nebius!"
  }'
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate ↵ select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.