Concepts / Credits and billing
Concepts

Credits and billing

What each check costs, whose credits it uses, and when nothing is charged.

On this page

Checks are paid with credits. Your account has a separate balance for each moderation type: text, image, video, audio and live stream credits. A check uses the credits of its own type.

Prices#

Type detect capture (default) censor
Text (per 2,500 characters) 1 1 1
Image 1 1 1
Video (per 60 frames checked, a minute at fps: 1) 1 2 2
Audio (per minute of sound) 1 1 1
Live stream (per minute at 1 fps) 1 2 2

The table is the price of an async check ("async": true). An answer given at once, the default, costs twice the table: an image costs 1 credit async and 2 at once. A live session is priced by the minute and is not doubled.

capture and censor cost one credit more than detect only when one of the flags you ask for is found by a model that also says where something is in an image or a video (boxes, times). The flags of video and live streams say where, which is why their rows cost 2 in those modes; the flags of text and images judge the whole content, so those cost the same in every mode. Checking fewer flags (flags) never costs more: if none of the flags you ask for says where, capture and censor cost what detect costs. See Choosing flags.

How video and live streams are priced is explained in Size, Video and Live streams.

Size#

Text, video and audio pay by size, in units of their price. An image is one unit; a live session pays by the minute.

  • Text: a unit per started 2,500 characters. Up to 2,500 characters is 1 unit, 2,501 to 5,000 is 2, and the longest text (10,000 characters) is 4. Characters are Unicode code points: an emoji is one.
  • Video: a unit per started 60 frames checked, a minute of video at the default fps: 1. The frames are the video's length times fps. One check takes a video of at most 300 frames (5 minutes at fps: 1); a longer one is refused with video_too_long. Some checks read a video before its length is known: then the part already read is charged (five units, shown in charged), and a video whose length cannot be read costs the longest check, five units.
  • Audio: a unit per started minute of sound. Up to a minute is 1 unit, a 4.5-minute recording is 5. One check takes a recording of at most 5 minutes; a longer one is refused with audio_too_long, free.
Example Units Async At once
A 6,000-character text 3 3 6
A 2-minute video at fps: 1, detect 2 2 4
A 2-minute video at fps: 2, detect 4 4 8
A 5-minute video at fps: 1, detect (300 frames) 5 5 10
A 90-second voice message 2 2 4

When you are charged#

  • A completed result is charged its price.
  • A partial result is free (usage.charged: 0): some flags could not be checked.
  • Errors are free: invalid requests, inputs that cannot be used, and 503 unavailability.
  • Credits are reserved when a check starts and returned at once if it does not complete. Parallel requests cannot spend the same credits twice. An async check is charged when it runs, not when you send it.
  • A check cut off because the connection dropped before its answer is not charged: its credits come back within about 20 minutes, and the request shows as failed.
  • A video holds one unit when it starts and is charged for its frames when it is done; a recording, for its minutes.
  • A recording pays for every minute the speech model heard, also when the check then stops short: partly checked, longer than its file said, or with the text checks unavailable. A recording refused before it is heard (its type, its size, its length as its file says it) is free. If your balance was lower than that, it goes below zero, and checks of that type are refused until you add credits.
  • Live sessions pay for the frames checked: each costs its share of a minute at the session's rate, rounded up to whole credits for the session. A minute is held in advance (at the start, then each time the held one runs out); when the session ends it keeps what its frames cost and the rest comes back. When a minute cannot be held, the session stops.

Your balance#

  • Every result has usage.remaining: the credits left for that type after the check (below zero after a video that cost more than was left).
  • Dashboard → Quota shows every balance and your plan.
  • When a type's balance is lower than the price of a check (for a video, one unit), the API answers 400 with {"error": "insufficient_quota", "message": "Not enough credits for image_moderation."} (live sessions: 402, same error). Nothing is charged.
result = moderate({"type": "image_moderation", "input": url})
if result["usage"]["remaining"] < 100:
    alert_ops("Detectivision image credits are running low")

Plans#

Credits come with your plan, per type. The plans and what each gives are on the dashboard's Quota page; contact us to change plan or for volume and custom plans.