Trang này chỉ có tiếng Anh.

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.

Nothing is on sale here today

A per-input endpoint sells only models with a published per-input price. OpenAI's moderation models are free upstream and Mistral's bill per token, so neither has one, and a request for either is refused, saying no sharer offers it. The endpoint serves as below once a model with such a price is listed.

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 sharer'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 sharer 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.