Skip to main content
POST
Create embeddings (ZeroClick-authenticated)
This is the Embeddings endpoint behind ZeroClick, ZeroGPU’s agent-payment layer. Same request/response bodies and same model routing as /v1/embeddings — only authentication, authorization, and metering differ.
  • Authentication — no x-api-key. A buying agent calls ZeroClick’s hosted pay URL; ZeroClick proxies the request and signs the raw request bytes with an HMAC in the zc-signature header. A request is authenticated only by a valid signature.
  • Authorization — a ZeroClick allowance check runs before any billable work. It fails open on a transient ZeroClick outage (the signature has already verified), but never for a missing or invalid signature.
  • Metering — billed on input tokens only. The prompt_tokens from the response’s usage are settled with ZeroClick and reported via the zc-usage response header. Stripe metering is bypassed; ZeroClick is the sole biller.
Handle errors the same way as API error codes.

Authorizations

zc-signature
string
header
required

HMAC signature minted by ZeroClick over the raw request bytes, of the form t=<unix-seconds>,kid=<key-id>,v1=<hex-hmac>. Verified by the @zeroclickai/sellers SDK against the seller's signing secret keyed by kid. A missing or invalid signature is rejected with 401 invalid_zeroclick_signature; this is never failed open.

Headers

zc-request-id
string

ZeroClick request id, echoed in logs for correlation. Set by ZeroClick when it proxies the request.

Example:

"zcreq_1"

zc-agent-id
string

Identifier of the buying agent. Used to partition logs/analytics by agent; becomes the synthesized caller identity.

Example:

"agt_1"

Body

application/json
model
enum<string>
required

Embedding model to use. Embedding models are routable only on this endpoint.

Available options:
all-minilm-l6-v2,
bge-small-en-v1.5
Example:

"all-minilm-l6-v2"

input
required

Text to embed. A single string, or an array of strings (one vector per element). Inputs are truncated at the model's max token length.

Minimum string length: 1

Response

OpenAI embeddings list. Includes the zc-usage header settling actual usage with ZeroClick.

An OpenAI-compatible embedding list.

object
string
Example:

"list"

data
object[]
model
string

The resolved model id.

Example:

"all-MiniLM-L6-v2"

usage
object

Embeddings are billed on input tokens only; there are no output tokens.