- An endpoint URL
- A model value for the request
- An Inference API key from the same organization
curl. They contain the values expected by that endpoint.
The current quick-start flow documents the OpenAI-compatible Chat Completions interface. Do not assume other OpenAI API routes are supported unless they are documented separately.
Use the endpoint URL as shown
The endpoint URL already includes its API version path. It typically looks like:Use the exact model value from the snippet
Chat Completions requests include amodel field. Copy the exact value generated for the endpoint.
It can differ from:
- The endpoint name you chose
- The shorter model title in the catalog
- The identifier used by another or older endpoint
Python
Install the OpenAI SDK:JavaScript
Install the OpenAI package in your Node.js project:curl
For a direct request, append/chat/completions to the endpoint URL and send the API key as a bearer token:
Protect your API key
Do not commit the key to source control. For local testing, store it in an environment variable or another local secret store. For deployed applications, use the secret-management mechanism provided by your runtime or hosting platform. See Create and manage Inference API keys for the full key lifecycle.Before troubleshooting the request
Check these three things first:- The endpoint is Running or Partially running.
- The API key is Active and belongs to the same organization as the endpoint.
- The endpoint URL and
modelvalue were copied from that endpoint’s Quick-start snippet.