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 tohttps://inference.oumi.ai/v1.
ANTHROPIC-COMPATIBLE REQUESTS
Use these for Anthropic deployments, which/chat/completions rejects. The Anthropic API requires max_tokens.
STREAM LONG RESPONSES
Setstream 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 returns429 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
429a 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.
ERRORS
TRY A DEPLOYMENT WITHOUT CODE
On the deployment’s page, clickTry 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.