OpenAI-compatible API

rackAI speaks the OpenAI API for the calls most applications use, so existing code usually needs two changes: the base URL and the API key.

At a glance

  • Two changes: your base URL and your API key.
  • Supported: chat, completions, embeddings, models and rerank, with streaming.
  • Different: the error format and a few platform-managed fields, listed below.

Endpoints

Each Tenant has one base URL for all of its models. Your console shows it next to each deployment, with ready-to-copy snippets.

EndpointSupported
POST /chat/completionsYes, including streaming
POST /completionsYes, including streaming
POST /embeddingsYes, for embedding models
GET /modelsYes: lists your ready deployments and adapters
POST /rerankYes, for reranking models (Cohere- and Jina-style request shape)

Not available: audio, images, files, the Batch API and the OpenAI fine-tuning API. Fine-tuning has its own rackAI API and console pages.

Using your existing SDK

Point the OpenAI Python SDK, or any OpenAI-compatible client, at your Tenant's base URL and use a rackAI API key:

from openai import OpenAI

client = OpenAI(
    base_url="<your Tenant's base URL from the console>",
    api_key="<your rackAI API key>",
)

response = client.chat.completions.create(
    model="<your deployment name>",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True,
)

The console also gives curl and Vercel AI SDK examples.

Choosing a model or adapter

Set the model field to:

Responses return the name you used.

Authentication

Send your API key as a bearer token. Each key belongs to one Tenant and is inference-only by default. Create and revoke keys in the console.

Where rackAI differs from OpenAI

Get your API key →What the free trial includes →