Skip to main content
POST
Create moderation (ZeroClick-authenticated)
This is the Moderations endpoint behind ZeroClick, ZeroGPU’s agent-payment layer. Same request/response bodies and same model routing as /v1/moderations — only authentication, authorization, and metering differ. model may be omitted, or given as an OpenAI id such as omni-moderation-latest; either way the configured moderation model serves the request.
  • 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 — the input and output 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
input
required

Text to classify. A single string, an array of strings (one result per element), or an array of content parts ({ "type": "text", "text": "..." }) forming one multi-modal input.

Minimum string length: 1
model
string
default:zlm-v1-moderation-edge

Moderation model to use. Defaults to the configured moderation model; OpenAI ids (omni-moderation-latest, text-moderation-stable) are accepted and mapped to it.

Example:

"zlm-v1-moderation-edge"

Response

OpenAI moderations envelope. Includes the zc-usage header settling actual usage with ZeroClick.

OpenAI-compatible moderations envelope. One results entry per input.

id
string

Unique identifier for the moderation request.

Example:

"modr-0a1b2c3d4e5f60718293a4b5c6d7e8f90"

model
string

The model used for classification.

Example:

"zlm-v1-moderation-edge"

results
object[]

Moderation verdicts, one per input (a string input yields a single-element array).