Skip to main content
POST
Create a response

Authorizations

Authorization
string
header
required

Your virtual key, sk-alt-.... What every OpenAI and Anthropic SDK sends.

Headers

x-request-id
string

Your own reference for the request. Altrum uses it instead of making one, and returns it.

x-alt-prompt-id
string

Use a prompt saved in your AI Gateway prompts. Its messages go before yours.

x-alt-prompt-version
integer

The prompt version to use, such as 2. Without it, the latest version.

x-alt-cache-key
string

Keeps this request's cached answers apart from others, for example per customer.

x-alt-cache-ttl
string

Keeps the answer for less time than your setting: 30s, 5m, 1h or a number of seconds.

x-alt-cache-threshold
number

Asks for a closer match than your setting, from 0 to 1.

x-alt-cache-type
enum<string>

direct matches word for word only, semantic by meaning only.

Available options:
direct,
semantic
x-alt-cache-no-store
enum<string>

true serves from the cache when it can, but does not store this answer.

Available options:
true
x-alt-disable-content-logging
enum<string>

true keeps this request's prompt and reply out of the request log, even when your organization keeps content.

Available options:
true
x-alt-direct-key
enum<string>

true sends your own provider key in Authorization, x-api-key or x-goog-api-key, with your virtual key in x-alt-vk. Only when your organization allows it.

Available options:
true

Body

application/json

An OpenAI Responses request. Every other field the OpenAI API accepts is passed to the model.

model
string
required

The provider and the model, such as openai/gpt-4o-mini. A name without a provider is matched to one your organization can serve.

Example:

"openai/gpt-4o-mini"

input
any
required

Text, or a list of input items, in the OpenAI Responses format.

stream
boolean

Stream the answer as server-sent events.

fallbacks
string[]

Models to try in order when an attempt fails. Altrum's addition to the request body.

Response

The response.

The response is of type object.