Vultr Inference API (1.1.3)

Download OpenAPI specification:

Public customer API. Private Vultr integration routes that require the platform key are not included.

Messages

Create Message

Create a Message using the Anthropic Messages API format. This endpoint accepts Anthropic-native request payloads and returns Anthropic-native responses. The request is adapted internally to the underlying chat completions engine.

System prompt: Use the top-level system parameter for initial instructions. A later text-only system message may follow a user message; it may be last or precede an assistant message.

Content blocks: Message content may be a string or an array of typed content blocks (text, image, tool_use, tool_result).

Assistant prefill: If the final message uses the assistant role, the response continues immediately from that content.

Streaming: Set stream: true to receive server-sent events with typed event names (message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop).

Extended thinking: thinking.type: enabled requires budget_tokens below max_tokens and a model that supports enforced thinking budgets; other models reject this mode. Check reasoning.supports_max_tokens in /v1/models. adaptive uses the model's own thinking behavior, and disabled turns thinking off. Thinking blocks use API-generated signatures, and display: omitted hides their text while preserving a signature for continuation.

System instructions: A later system message keeps its position when forwarded to the model. Turn-scoped clear_at and per-message output_config are not supported.

Effort: Top-level output_config.effort maps through the selected model's reasoning_config. The :express model variant derives a thinking budget when the selected model supports enforced budgets and no budget is supplied.

Tools: Tools use input_schema (JSON Schema) rather than parameters. Tool results are sent as tool_result content blocks in subsequent user messages.

Authorizations:
APIKey
Request Body schema: application/json
required
model
required
string

The model identifier to use for generation.

max_tokens
required
integer >= 0

Total completion token allowance, including thinking and visible output. The gateway forwards zero if supplied; whether zero is accepted depends on the upstream engine.

required
Array of objects (Anthropic Message Param) non-empty

Input messages. Models operate on alternating user and assistant conversational turns. Consecutive user or assistant turns are combined into a single turn.

If the final message uses the assistant role, the response content continues immediately from that message's content (assistant prefill).

A text-only system message may follow a user turn, as the final message or before an assistant turn. Use the top-level system parameter for initial instructions. Turn-scoped clear_at and per-message output_config are not supported.

string or Array of Anthropic Text Block Param (objects)

System prompt providing context or instructions to the model. May be a string or an array of text blocks.

stream
boolean

Whether to stream the response using server-sent events. Streaming events use typed event names: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop.

temperature
number <float> [ 0 .. 1 ]

Controls randomness in the model responses. Valid range: 0 to 1.

top_p
number <float> [ 0 .. 1 ]

Enables nucleus sampling with a cumulative probability cutoff.

top_k
integer

Limits sampling to the top K options.

stop_sequences
Array of strings

Custom sequences that, when encountered in the generated text, cause the model to stop.

object

Additional metadata about the request.

object

Output controls. Effort is translated through the selected model's reasoning configuration. Unsupported configured levels return 422.

object

Thinking configuration. The adapter signs its own thinking blocks for continuation; it does not emit redacted thinking blocks.

Array of objects (Anthropic Tool Definition)

Definitions for tools available to the model.

object

Instructs how the model should use any provided tools.

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "max_tokens": 0,
  • "messages": [
    ],
  • "system": "string",
  • "stream": true,
  • "temperature": 1,
  • "top_p": 1,
  • "top_k": 0,
  • "stop_sequences": [
    ],
  • "metadata": {
    },
  • "output_config": {
    },
  • "thinking": {
    },
  • "tools": [
    ],
  • "tool_choice": {
    }
}

Response samples

Content type
{
  • "id": "string",
  • "type": "message",
  • "role": "assistant",
  • "model": "string",
  • "content": [
    ],
  • "stop_reason": "end_turn",
  • "stop_sequence": "string",
  • "usage": {
    }
}

Chat

Create Chat Completion

Create Chat Completion on a specified text generation model.

Continuation: If the final message has the assistant role, the model continues that message instead of starting a new turn (the same convention as Anthropic and OpenRouter). Send a response that ended with finish_reason length back as the final assistant message to resume it. The message must be non-empty text without tool_calls, trailing whitespace is trimmed, thinking is disabled for the continuation, and only the new text is returned.

Normalizer Mode: Append -normalize to the model name (e.g. <model>-normalize) to route the request through the normalizer proxy, which applies the following fixes to non-standard OpenAI responses:

  • reasoning_contentreasoning (streaming deltas and non-streaming messages)
  • Tool call IDs: functions.xxx:Nchatcmpl-tool-<hash>
  • content=None with tool_callscontent=""
  • Strip empty tool_calls=[] from streaming deltas
  • Remove content=null from streaming tool call deltas
  • Strip whitespace-only content when tool_calls are present in streaming deltas

Reasoning budget: Set reasoning.max_tokens to limit thinking tokens. This limit must be below max_completion_tokens (or the effective context-clipped limit). Models with reasoning.supports_max_tokens: true in /v1/models enforce the budget; other models accept the field without enforcing it. Requested effort maps through the model's reasoning_config when configured. The :express model variant derives a budget for models with enforced budget support when no budget is supplied.

Authorizations:
APIKey
Request Body schema: application/json
required
model
string

The model to use. If omitted, the gateway resolves its default model. Append -normalize to route through the response normalizer. A :<variant> suffix is parsed separately from the model ID; :express derives a thinking budget when the model supports enforced budgets and no explicit budget is supplied.

required
Array of objects (Chat Completion Request Message) non-empty

The message context to use for the chat completion request, separated by system, user, assistant, tool, and developer roles. A final assistant message is treated as a prefill and continued (see continue_final_message).

continue_final_message
boolean
Default: false

Continue the final message instead of starting a new assistant turn. Implied whenever the final message has the assistant role, so it only makes the intent explicit. The final message must carry non-empty text and no tool_calls; trailing whitespace is trimmed, thinking is disabled for the continuation, and only the newly generated text is returned. Use it to resume a response that ended with finish_reason length.

stream
boolean

Indicates whether the response should be streamed.

max_tokens
integer

Deprecated name for max_completion_tokens. If both are sent, max_completion_tokens takes precedence.

max_completion_tokens
integer >= 1
Default: 32768

Maximum completion tokens, including reasoning and visible output. The effective limit may shrink to fit the model context window.

reasoning_effort
string
Enum: "ultra" "max" "xhigh" "high" "medium" "low" "minimal" "none"

Shorthand for reasoning.effort. When both are supplied, reasoning.effort takes precedence. Configured models map this level to their supported reasoning control; unsupported levels return 422.

object (Reasoning Request Options)

Reasoning controls. Configured models map effort through their database profile. Models advertising reasoning.supports_max_tokens: true in /v1/models enforce the budget; other models accept it without enforcing it.

n
integer
Default: 1

The number of chat completion choices to generate for each input message.

seed
integer

If you would like a different response from the same message, changing the seed will change the response. A null value generates a random seed.

temperature
number <float> [ 0 .. 2 ]
Default: 1

A value between 0.0 and 2.0 that controls the randomness of the model's output. When set closer to 1, such as 0.8, the outcome is more unpredictable and creative. Values nearing 0, like 0.2, produce more predictable and less creative results. A temperature of zero requests greedy decoding; exact reproducibility depends on the model engine.

top_p
number <float> [ 0 .. 1 ]
Default: 1

A value between 0.0 and 1.0 that controls the probability of the model generating a particular token. A higher value will result in more diverse outputs, while a lower value will result in more repetitive outputs.

frequency_penalty
number <float> [ -2 .. 2 ]
Default: 0

A value between -2.0 and 2.0 that controls how much the model penalizes generating repetitive responses.

presence_penalty
number <float> [ -2 .. 2 ]
Default: 0

A value between -2.0 and 2.0 that controls how much the model penalizes generating responses that contain certain words or phrases.

stop
Array of strings

A list of strings that the model will stop generating text if it encounters any of them.

logprobs
boolean

Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.

top_logprobs
integer [ 0 .. 20 ]

An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.

string or object or Array of Chat Completion Function Tool Choice (objects)
Array of objects (Chat Completion Function Tool)

A list of function tools the model may call.

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "messages": [
    ],
  • "continue_final_message": false,
  • "stream": true,
  • "max_tokens": 0,
  • "max_completion_tokens": 32768,
  • "reasoning_effort": "ultra",
  • "reasoning": {
    },
  • "n": 1,
  • "seed": 0,
  • "temperature": 1,
  • "top_p": 1,
  • "frequency_penalty": 0,
  • "presence_penalty": 0,
  • "stop": [
    ],
  • "logprobs": true,
  • "top_logprobs": 20,
  • "tool_choice": "none",
  • "tools": [
    ]
}

Response samples

Content type
{
  • "id": "string",
  • "created": 0,
  • "model": "string",
  • "choices": [
    ],
  • "usage": {
    }
}

RAG Chat Completion

Create a chat completion with context retrieved from items or files in a vector store collection. Reasoning effort, thinking budget, and the express variant follow the Chat Completions behavior.

Authorizations:
APIKey
Request Body schema: application/json
required
collection
required
string

The vector store collection to search for relevant context.

model
required
string

The model that will be inferred for chat completion. Append -normalize to the model name (e.g. <model>-normalize) to normalize non-standard OpenAI responses such as reasoning_contentreasoning and fix tool call ID formats.

required
Array of objects (Chat Completion Request Message) non-empty

The message context to use for the chat completion request, separated by system, user, assistant, tool, and developer roles.

max_tokens
integer

Deprecated name for max_completion_tokens. If both are sent, max_completion_tokens takes precedence.

max_completion_tokens
integer >= 1
Default: 32768

Maximum completion tokens, including reasoning and visible output.

reasoning_effort
string
Enum: "ultra" "max" "xhigh" "high" "medium" "low" "minimal" "none"

Shorthand for reasoning.effort. Configured models map this level to their supported reasoning control.

object (Reasoning Request Options)

Reasoning controls. Configured models map effort through their database profile. Models advertising reasoning.supports_max_tokens: true in /v1/models enforce the budget; other models accept it without enforcing it.

n
integer
Default: 1

The number of chat completion choices to generate for each input message.

seed
integer

If you would like a different response from the same message, changing the seed will change the response. A null value generates a random seed.

temperature
number <float> [ 0 .. 2 ]
Default: 1

A value between 0.0 and 2.0 that controls the randomness of the model's output. When set closer to 1, such as 0.8, the outcome is more unpredictable and creative. Values nearing 0, like 0.2, produce more predictable and less creative results. A temperature of zero requests greedy decoding; exact reproducibility depends on the model engine.

top_p
number <float> [ 0 .. 1 ]
Default: 1

A value between 0.0 and 1.0 that controls the probability of the model generating a particular token. A higher value will result in more diverse outputs, while a lower value will result in more repetitive outputs.

stop
Array of strings

A list of strings that the model will stop generating text if it encounters any of them.

frequency_penalty
number <float> [ -2 .. 2 ]
Default: 0

A value between -2.0 and 2.0 that controls how much the model penalizes generating repetitive responses.

presence_penalty
number <float> [ -2 .. 2 ]
Default: 0

A value between -2.0 and 2.0 that controls how much the model penalizes generating responses that contain certain words or phrases.

stream
boolean

Indicates whether the response should be streamed.

logprobs
boolean

Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.

top_logprobs
integer [ 0 .. 20 ]

An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.

string or object or Array of Chat Completion Function Tool Choice (objects)
Array of objects (Chat Completion Function Tool)

A list of function tools the model may call.

Responses

Request samples

Content type
application/json
{
  • "collection": "string",
  • "model": "string",
  • "messages": [
    ],
  • "max_tokens": 0,
  • "max_completion_tokens": 32768,
  • "reasoning_effort": "ultra",
  • "reasoning": {
    },
  • "n": 1,
  • "seed": 0,
  • "temperature": 1,
  • "top_p": 1,
  • "stop": [
    ],
  • "frequency_penalty": 0,
  • "presence_penalty": 0,
  • "stream": true,
  • "logprobs": true,
  • "top_logprobs": 20,
  • "tool_choice": "none",
  • "tools": [
    ]
}

Response samples

Content type
{
  • "id": "string",
  • "created": 0,
  • "model": "string",
  • "choices": [
    ],
  • "usage": {
    }
}

Responses

Create Response

Create an OpenAI-compatible response. reasoning.effort maps through the selected model's reasoning_config when configured. reasoning.max_tokens caps thinking tokens when the model advertises reasoning.supports_max_tokens: true in /v1/models; other models accept the budget without enforcing it. reasoning.context and reasoning.mode are accepted but ignored. The :express model variant derives a budget for models with enforced budget support when no budget is supplied.

Authorizations:
APIKey
Request Body schema: application/json
required
model
string

If omitted, the gateway resolves its default model. A :<variant> suffix is parsed separately from the model ID; :express derives a thinking budget when the model supports enforced budgets and no explicit budget is supplied.

input
required
any

Input text or structured input items.

max_output_tokens
integer >= 1
Default: 32768

Maximum output tokens, including reasoning and visible output.

object (Reasoning Request Options)

Reasoning controls. Configured models map effort through their database profile. Models advertising reasoning.supports_max_tokens: true in /v1/models enforce the budget; other models accept it without enforcing it.

stream
boolean

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "input": null,
  • "max_output_tokens": 32768,
  • "reasoning": {
    },
  • "stream": true
}

Response samples

Content type
{
  • "id": "string",
  • "object": "response",
  • "model": "string",
  • "output": [
    ],
  • "usage": { }
}

Rerank

Rerank Documents

Rerank documents against a query. The API forwards optional ranking parameters and returns the selected upstream model's JSON response.

Authorizations:
APIKey
Request Body schema: application/json
required
model
required
string
query
required
string non-empty
required
Array of strings or objects non-empty
top_n
integer
return_documents
boolean

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "query": "string",
  • "documents": [
    ],
  • "top_n": 0,
  • "return_documents": true
}

Response samples

Content type
application/json
{ }

Audio

Create Speech

Generates speech audio from input text.

Authorizations:
APIKey
Request Body schema: application/json
required
model
required
string

The model that will be used to generate text-to-speech audio.

input
required
string

The text to generate audio for, up to a maximum of 2,000 characters.

voice
required
string

The voice that will be used in the generated audio.

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "input": "string",
  • "voice": "string"
}

List Audio Voices

Get a list of voices for speech generation.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "bark": [
    ],
  • "xtts": [
    ]
}

Vector Store

List Collections

Retrieve a list of vector store collections.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "collections": [
    ]
}

Create Collection

Creates a vector store collection for searchable embeddings.

Authorizations:
APIKey
Request Body schema: application/json
required
name
required
string

The name of the vector store collection. This is also used to auto-generate a unique ID for the record.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "collection": {
    }
}

Get Collection

Retrieve a vector store collection by the ID.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Responses

Response samples

Content type
application/json
{
  • "collection": {
    }
}

Update Collection

Updates a vector store collection record.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Request Body schema: application/json
required
name
required
string

The name of the vector store collection. Note: the previously generated unique ID will remain the same.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "collection": {
    }
}

Delete Collection

Deletes a vector store collection record. This will also remove all items in the collection.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Responses

Search Collection

Searches items in a vector store collection for the closest embeddings matches.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Request Body schema: application/json
required
input
required
string

The text query to search against the embeddings items in the vector store collection.

Responses

Request samples

Content type
application/json
{
  • "input": "string"
}

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "usage": {
    }
}

List Collection Items

Retrieve a list of items within a vector store collections.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Add Collection Item

Adds an item to a vector store collection.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Request Body schema: application/json
required
content
required
string

The text to be converted into embeddings and stored in the vector store collection.

description
string

A description of the contents in this collection item record. If omitted, this value will default to a shortened version of the text stored in the collection.

auto_chunk
boolean

Indicates whether the system will automatically chunk the content if it exceeds the embeddings model's maximum sequence length. If set to true, the content will be split into 300 token chunks with 20 tokens of overlap before and after each piece.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "description": "string",
  • "auto_chunk": true
}

Response samples

Content type
application/json
Example
{
  • "item": {
    },
  • "usage": {
    }
}

Get Collection Item

Retrieve a vector store collection item by the ID.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

itemid
required
string

The ID of the vector store collection item.

Responses

Response samples

Content type
application/json
{
  • "item": {
    }
}

Update Collection Item

Updates a vector store collection item record.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

itemid
required
string

The ID of the vector store collection item.

Request Body schema: application/json
required
description
required
string

A description of the contents in this collection item record.

Responses

Request samples

Content type
application/json
{
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "item": {
    }
}

Delete Collection Item

Deletes a vector store collection item record.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

itemid
required
string

The ID of the vector store collection item.

Responses

List Collection Files

Retrieve a list of files within a vector store collections.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Responses

Response samples

Content type
application/json
{
  • "files": [
    ]
}

Add Collection File

Adds a file to a vector store collection.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

Request Body schema: multipart/form-data
required
file
required
string <binary>

The file object to be uploaded to the vector store collection.

Responses

Response samples

Content type
application/json
{
  • "file": {
    }
}

Get Collection File

Retrieve a vector store collection file by the ID.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

fileid
required
string

The ID of the vector store collection file.

Responses

Response samples

Content type
application/json
{
  • "file": {
    }
}

Delete Collection File

Deletes a vector store collection file record.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the vector store collection.

fileid
required
string

The ID of the vector store collection file.

Responses

Images

Create Image

Creates an image given a prompt.

Authorizations:
APIKey
Request Body schema: application/json
required
prompt
required
string

A text description of the desired image(s). The maximum length is 2000 characters.

model
string
Default: "flux.1-dev"

The model to use for image generation. Defaults to flux.1-dev.

n
integer [ 1 .. 10 ]
Default: 1

The number of images to generate. Must be between 1 and 10.

response_format
string
Default: "url"

The format in which generated images are returned. Must be one of url or b64_json.

size
string
Default: "1024x1024"

The size of the generated images. Must be one of 256x256, 512x512, 1024x1024 (default value), 1792x1024, and 1024x1792.

Responses

Request samples

Content type
application/json
{
  • "prompt": "string",
  • "model": "flux.1-dev",
  • "n": 1,
  • "response_format": "url",
  • "size": "1024x1024"
}

Response samples

Content type
application/json
{
  • "created": 0,
  • "data": [
    ]
}

Models

List Models

Retrieve the public inference model catalog. By default this returns OpenRouter ModelDocumentV2 entries; send the Anthropic-Version header for an Anthropic-compatible model list with cursor pagination. X-Vultr-Model-Type applies only to the default catalog.

query Parameters
after_id
string

Anthropic mode only. Return the page after this model ID.

before_id
string

Anthropic mode only. Return the page before this model ID.

limit
integer [ 1 .. 1000 ]
Default: 20

Anthropic mode only. Number of models per page.

header Parameters
anthropic-version
string
Example: 2023-06-01

When present, return Anthropic model entries and pagination fields instead of the default catalog.

X-Vultr-Model-Type
string
Value: "chat"

Filter the default catalog to chat-completion models. Ignored in Anthropic mode.

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Get Model

Retrieves a specific inference model.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the inference model.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "object": "string",
  • "owned_by": "string",
  • "features": [
    ]
}

Get Namespaced Model

Retrieve a model whose identifier contains one slash, using the two path segments as its ID.

Authorizations:
APIKey
path Parameters
id
required
string

The ID of the inference model.

id2
required
string

The second segment of the model identifier.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "object": "string",
  • "owned_by": "string",
  • "features": [
    ]
}

List All Models

Retrieve a list of all supported inference models.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "chat": [
    ],
  • "audio": [
    ],
  • "image": [
    ]
}

Usage

Get Usage

View usage information for the current and previous months.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "current_month": {
    },
  • "previous_month": {
    }
}

Health Check

Get Cluster Status

View the current status of the inference cluster.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}