Inference API

Legacy & Deprecated

View as Markdown

Completions (legacy)

/v1/completions

(Legacy - Not supported by reasoning models) Create a text completion response for a given prompt. Replaced by /v1/chat/completions.

Request Body

Response Body

choices

array

A list of response choices from the model. The length corresponds to the n in request body (default to 1).

created

integer

The chat completion creation time in Unix timestamp.

id

string

ID of the request.

model

string

Model to be used.

object

string

Object type of the response. This is always "text_completion".


Deprecated: The Anthropic SDK compatibility is fully deprecated. Please migrate to the Responses API or gRPC.

Messages (Anthropic compatible - deprecated)

/v1/messages

Create a messages response. This endpoint is compatible with the Anthropic API.

Request Body

Response Body

content

array

Response message content.

id

string

Unique object identifier.

model

string

Model name that handled the request.

role

string

Role of the generated message. Always "assistant"

type

string

Object type. This is always "message" for message types.

usage

object


Deprecated: The Anthropic SDK compatibility is fully deprecated. Please migrate to the Responses API or gRPC.

Completions (Anthropic compatible - deprecated)

/v1/complete

(Legacy - Not supported by reasoning models) Create a text completion response. This endpoint is compatible with the Anthropic API.

Request Body

Response Body

completion

string

The completion content up to and excluding stop sequences.

id

string

ID of the completion response.

model

string

The model that handled the request.

type

string

Completion response object type. This is always "completion".


Did you find this page helpful?