Skip to main content

Overview

Nebius is an OpenAI-compatible provider offering comprehensive API support. Bifrost delegates to the OpenAI implementation with standard parameter filtering. Key features:
  • Full OpenAI compatibility - Chat, text completion, embeddings, and responses
  • Streaming support - Server-Sent Events with delta-based updates
  • AI Project ID - Nebius-specific project identifier support
  • Tool calling - Complete function definition and execution
  • Parameter filtering - Removes unsupported OpenAI-specific fields

Supported Operations

Unsupported Operations (❌): Speech, Transcriptions, Files, and Batch are not supported by the upstream Nebius API. These return UnsupportedOperationError.

Setup & Configuration

Configure Nebius as a provider.
Nebius provider dashboard
  1. Navigate to Models > Model Providers. Look for Nebius under Configured Providers. If it is missing, click on Add New Provider and select Nebius.
  2. Click Add Key or edit an existing key.
  3. Set a name for your key.
  4. Paste your API key directly or use an environment variable (for example, env.NEBIUS_API_KEY).
  5. Set Allowed Models to All Models (default) or the specific model allowlist you want this key to serve.
  6. Save the provider configuration.

1. Chat Completions

Request Parameters

Nebius supports all standard OpenAI chat completion parameters. For full parameter reference and behavior, see OpenAI Chat Completions.

Nebius-Specific Parameters

ai_project_id (Optional): Nebius allows specifying a project ID for resource organization:
The ai_project_id is appended as a query parameter to the request URL.

Filtered Parameters

Removed for Nebius compatibility:
  • prompt_cache_key - Not supported
  • verbosity - Anthropic-specific
  • store - Not supported
  • service_tier - Not supported
Nebius supports all standard OpenAI message types, tools, responses, and streaming formats. For details on message handling, tool conversion, responses, and streaming, refer to OpenAI Chat Completions.

2. Responses API

Converted internally to Chat Completions:
Same parameter support and message handling as Chat Completions. Supports ai_project_id via extra_params.

3. Text Completions

Nebius supports legacy text completion format:

4. Embeddings

Nebius supports text embeddings: Response returns embedding vectors with usage information.

5. Image Generation

Request Parameters Extra Parameters (via extra_params)
Request Conversion
  • Model & Prompt: bifrostReq.Modelreq.Model (pointer), bifrostReq.Input.Promptreq.Prompt (pointer)
  • Size Conversion: params.size (WxH format like "1024x1024") is split into:
    • width: Integer extracted from first part (e.g., 1024)
    • height: Integer extracted from second part (e.g., 1024)
  • Output Format:
    • params.output_formatreq.ResponseExtension
    • Special conversion: "jpeg""jpg" (Nebius uses "jpg" not "jpeg")
  • Response Format: params.response_formatreq.ResponseFormat (passed directly: "url" or "b64_json")
  • Seed & Negative Prompt: params.seedreq.Seed, params.negative_promptreq.NegativePrompt (passed directly)
  • Num Inference Steps: params.num_inference_stepsreq.NumInferenceSteps (passed directly)
  • Extra Parameters:
    • guidance_scalereq.GuidanceScale (int pointer)
    • ai_project_id → Added as query parameter ?ai_project_id={value} to the request URL
Response Conversion
  • Image Data: Each item in response.data[]ImageData with:
    • url: From data[].url
    • b64_json: From data[].b64_json
    • revised_prompt: From data[].revised_prompt
    • index: Sequential index (0, 1, 2, …)
  • ID: response.idresponse.ID
  • Provider: Set to nebius in ExtraFields
Endpoint: /v1/images/generations Streaming: Image generation streaming is not supported by Nebius.

6. List Models

Lists available Nebius models with capabilities and context lengths.

Unsupported Features


Caveats

Severity: Medium Behavior: Cache control directives are removed from messages Impact: Prompt caching features don’t work Code: Stripped during JSON marshaling
Severity: Low Behavior: OpenAI-specific fields filtered out Impact: prompt_cache_key, verbosity, store removed Code: filterOpenAISpecificParameters
Severity: Low Behavior: User field > 64 characters silently dropped Impact: Longer user identifiers are lost Code: SanitizeUserField enforces 64-char max