Skip to main content
Each running Inference API endpoint gives you three values you need to make a request:
  • An endpoint URL
  • A model value for the request
  • An Inference API key from the same organization
Open the endpoint details and use the generated Quick-start snippets for Python, JavaScript, or 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 this full value as the base URL in an SDK client.
Do not append another /v1. For a direct Chat Completions request, add /chat/completions to the endpoint URL, not another API-version segment.

Use the exact model value from the snippet

Chat Completions requests include a model 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
If you receive a model-not-found error, check this value first.

Python

Install the OpenAI SDK:
Then use your endpoint values:

JavaScript

Install the OpenAI package in your Node.js project:
Then configure the client with the same endpoint URL and key:

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.
If a key is exposed, create a replacement, update the applications that use it, and revoke the exposed key.
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 model value were copied from that endpoint’s Quick-start snippet.
For authentication, capacity, latency, or endpoint-state problems, see Troubleshoot Hivenet Inference API.

Next steps