Skip to main content

Create a text completion

POST 

/completions

Generate text from a prompt. Requires the execute:inference:requests permission and access to inference. Prepaid accounts must have positive inference credit. Select a model from GET /models; support depends on the selected model.

With stream=true, the response is an SSE stream of JSON text completion chunks with choices[].text, followed by data: [DONE]. Clients must accept usage-only chunks with an empty choices array. Errors before streaming use an HTTP error response; an interrupted stream is not a complete response.

Request​

Responses​

A JSON text completion, or SSE chunks when stream=true. Streaming ends with data: [DONE].

Response Headers
    X-Aurora-Resolved-Model

    Canonical model selected for this request. The response body retains the requested model ID or alias.