Create a completion

OpenAI-compatible prompt completions for clients that send a raw prompt instead of chat messages. Only models that advertise POST /v1/completions in supported_endpoints accept this shape. Streaming uses Server-Sent Events and includes usage when the model service reports it.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Request

This endpoint expects an object.
modelstringRequired
promptstring or list of stringsRequired
streambooleanOptionalDefaults to false
temperaturedoubleOptional0-2
max_tokensintegerOptional
top_pdoubleOptional0-1
stopstring or list of stringsOptional
logit_biasmap from strings to doublesOptional
Bias token IDs by adding positive or negative values before sampling.

Response

Completion object or SSE stream when stream=true.

idstring
objectstring
createdinteger
modelstring
choiceslist of objects
usageobject

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
429
Too Many Requests Error