API endpoints¶
The inference API accepts the requests to the models. The inference API authenticates with a token from the Tokens section of the My Account view. The {tenant} placeholder stands for the tenant, {gateway} for the gateway.
The following options are available:
| Endpoint | Description |
|---|---|
POST /v1/{tenant}/{gateway}/compat/chat/completions |
Sends a conversation to the model. The path is compatible with the schema of OpenAI. |
POST /v1/{tenant}/{gateway}/compat/completions |
Sends a single input to the model. |
POST /v1/{tenant}/{gateway}/compat/embeddings |
Creates embeddings for an input. |
POST /v1/{tenant}/{gateway}/{provider}/chat/completions |
Sends a conversation to a specified provider. |
POST /v1/{tenant}/{gateway}/{provider}/embeddings |
Creates embeddings at a specified provider. |
The admin API serves the interface. The admin API answers the following endpoints for the Member role.
The following options are available:
| Endpoint | Description |
|---|---|
GET /admin/v1/statsGET /admin/v1/stats/timeseries |
Shows the usage figures. The Administrator and Tenant Administrator roles see the figures of the whole tenant. Every other role sees only its own. |
GET /admin/v1/providersGET /admin/v1/models |
Lists the providers and models supported. |
Note
For this role, the API answers the endpoints for the gateways, the user accounts, the tenants, the analyses, the request logs, and the model prices with the 403 status.
Note
From the admin API, the Viewer role calls only GET /admin/v1/stats and GET /admin/v1/stats/timeseries. The Viewer role creates no tokens. The inference API is therefore not available to the Viewer role. The Demo User role calls neither the inference API nor the admin API.
The subsections describe each endpoint separately with its parameters, an example, and its status codes.