Moderations

POST /v1/moderations is OpenAI's moderation endpoint. The model is <provider>/<model>, for example openai/omni-moderation-latest or mistral/mistral-moderation-latest.

cURLcurl
1curl https://api.aile.sh/v1/moderations \
2-H "Authorization: Bearer $AILE_KEY" \
3-H "Content-Type: application/json" \
4-d '{ "model": "openai/omni-moderation-latest", "input": "some text" }'

Billing

  • A string is one input. An array of strings is one input per string, up to 2,048.
  • An array of text / image_url items is one input. Only models that read images accept them, and Mistral models take strings only.
  • The hold is the inputs sent. You pay for the results returned, never more. A response with no results is a 502 and is not charged.
  • A provider refusal you can fix (400, 404, 413, 422 …) passes through. One about the lender's account is a 502 saying you were not charged. A 502 or 504 arrives as 503 with the real code in x-aile-status.
  • A key's pins and the routing headers choose the lender here too. x-aile-provider must match the model's prefix, and x-aile-max-price does not apply to a per-input price.
  • Where the deployment enables it, moderations also take keyless x402.

Results are yours. Aile does not act on them, and a flagged result never counts against you.