Inference
dev-api

Create chat completion (OpenAI-compatible)

Changed on

Create a chat completion. Compatible with the OpenAI Chat Completions API. Not end-to-end encrypted — use /rvenc/chat/completions for that.

post/openai/chat/completions

Request

  • Base URL
    https://gateway.prem.io
  • Auth
    HTTP bearer and API key in header Authorization

Headers

X-Queue-Timeoutstring
Example:0

Maximum seconds the request may wait in the inference queue when no capacity is free (decimals allowed). 0 never queues: a saturated model answers 429 immediately. Values above the server budget (10s) are capped; the header can only shorten the wait, never extend it. Invalid values are ignored. A request that cannot be admitted in time gets 429 with Retry-After.

Request body

modelstring required

Model name, as listed by GET /models.

messagesobject[] required

Conversation messages.

streamboolean

If true, the response is a server-sent events stream.

providerstring

Optional. Pin the request to one of the model's configured backends. Omit to let the platform choose.

Response

A chat completion, or a server-sent events stream when stream is true.

object required

Changes

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • info

      added the new optional header request parameter X-Queue-Timeout

    • info

      removed the pattern ^[a-z0-9][a-z0-9-]*$ from the request property

    • info

      endpoint added