Skip to main content
POST
Create embeddings

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
model
string
required
input
required
Required string length: 1 - 65536
encoding_format
enum<string>
default:float
Available options:
float
dimensions
integer

Requires verified adjustable dimensions on the selected embedding model.

Required range: 1 <= x <= 16384
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.

object
enum<string>
required
Available options:
list
model
string
required
data
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.