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.
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_urlitems 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
502and is not charged. - A provider refusal you can fix (
400,404,413,422…) passes through. One about the lender's account is a502saying you were not charged. A502or504arrives as503with the real code inx-aile-status. - A key's pins and the routing headers choose the lender here too.
x-aile-providermust match the model's prefix, andx-aile-max-pricedoes 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.