Skip to main content
A deployment’s endpoint is compatible with the OpenAI and Anthropic APIs. To call it, point the OpenAI or Anthropic SDK at the Oumi endpoint and pass the deployment as the model. The quickest way to start is with your deployment’s own snippets. On the deployment’s page, click View endpoint & code to copy a curl, Python, or TypeScript example that already has your endpoint and deployment path filled in.

ENDPOINT AND AUTHENTICATION

Create a personal API key under User Settings > API Keys, or click Create one in the Endpoint & code dialog.

OPENAI-COMPATIBLE REQUESTS

Use these for custom, base, and OpenAI deployments. Set the base URL to https://inference.oumi.ai/v1.

ANTHROPIC-COMPATIBLE REQUESTS

Use these for Anthropic deployments, which /chat/completions rejects. The Anthropic API requires max_tokens.
The Anthropic SDKs add /v1 to the base URL themselves, so set their base URL to https://inference.oumi.ai.

STREAM LONG RESPONSES

Set stream to true to receive the response as it is generated. Stream any request that can produce a long response. A non-streaming request waits for the whole response, and it times out if the model takes too long.

SEND THE TRAINING SYSTEM PROMPT

A fine-tuned model performs best with the system prompt it was trained on. If your training data had a system prompt, send the same one with every request. The System prompt section on the deployment’s Info & Configuration tab shows prompts sampled from the training data.

COLD STARTS

A custom or base deployment with min replicas set to 0 has no running replica when it is idle. The first request after an idle period starts a replica and returns 429 with the message “Deployment is warming up” and a Retry-After header. A replica usually takes a few minutes to start.
  • Retry: Send the request again until it succeeds. The OpenAI and Anthropic SDKs retry a 429 a few times by default, which may not cover the whole warm-up. Raise the SDK’s retry count, or handle the retry yourself.
  • Wake the deployment first: Before a batch of requests, run oumi-cli deployments wake-up, which waits until the deployment is ready. See the CLI reference.
  • Avoid cold starts: Set min replicas to 1. See Autoscaling.
External deployments have no cold starts.

ERRORS

TRY A DEPLOYMENT WITHOUT CODE

On the deployment’s page, click Try in Playground to chat with it in the Model Playground. The button is enabled only when the deployment is Active. You can also ask FAiE (Frontier AI Engineer Agent) to send a prompt to the deployment.