Skip to main content
POST
Create response

Authorizations

Authorization
string
header
required

An API key created in the OmniRelay console. The owner can view it again in the console after confirming their identity.

Headers

X-Gateway-Tags
string

Tags for this call as comma-separated key=value pairs, for example client=acme,env=prod. Merged with the API key's default tags; the tags body field wins on the same key. X-OmniRelay-Tags is the same header under its former name and stays accepted.

X-Gateway-Metadata
enum<string>

Send enabled to receive a gateway_metadata block describing what the gateway decided. Any other value, or no header, leaves the response unchanged. X-OmniRelay-Metadata is the same header under its former name and stays accepted.

Available options:
enabled

Body

application/json

Parameter passthrough: ordinary extension fields are forwarded; authentication, text/function protocol and budget settlement boundaries remain enforced.

model
string
required
input
required

Text or explicit message/function-call history. Text parts only; hosted tools and stored response references are unsupported.

Maximum string length: 1048576
instructions
string
Maximum string length: 1048576
max_output_tokens
integer
Required range: x >= 1
stream
boolean
default:false
store
enum<boolean>
default:false
Available options:
false
tools
object[]

Live only when tools are supported. Function tools only; strict tools and JSON Schema keywords require separate support. See the provider integration guide.

Required array length: 1 - 64 elements
tool_choice

Use auto, none or required when tool_choice is advertised. Named function selection additionally requires capabilities.named_tool_choice.

Available options:
auto,
none,
required
parallel_tool_calls
boolean
text
object
reasoning
object
tags
object

Tags for this call. At most 10 after merging with the header and the key's default tags. Keys are 1 to 64 characters and stored in lowercase; values are 1 to 128 characters. Both use only letters, digits and - _ . : /. Keys starting with gateway: or omnirelay: are reserved. A tags field that is not an object is ignored.

Example:

Response

Validated result with settled usage and cost.

id
string
required
object
enum<string>
required
Available options:
response
status
enum<string>
required
Available options:
completed,
incomplete
model
string
required
output
object[]
required
usage
object
required
cost_microusd
integer
required

Settled customer charge in micro-USD, using frozen prices, token partitions, tiers and discount. Round the full sum, apply the discount and round up again. This is the final charge, not the maximum hold.

created_at
integer
error
object | null
incomplete_details
object | null
store
enum<boolean>
Available options:
false