?taskType=GEMINI to read one engine. Aliases such as GOOGLE_AIO are accepted. See Get capabilities.
Credits per task
Prices do not vary by plan; the dollar value of a credit does. Credits can have two decimals, such as
1.25.
Citation Analysis metering
ACITATION_ANALYSIS task holds 20 + 12 × citations + 80 × ⌈answer characters ÷ 1,000⌉ credits at submit. On completion it is charged 1 + ⌈input tokens ÷ 500⌉ + ⌈output tokens ÷ 100⌉ + 2 × source fetches, never more than the hold. The rest of the hold is released. See Citation Analysis.
Hold, capture and release
1
Submit: hold
The task’s price (for
WEB_CRAWL, GEO_SCORE and CITATION_ANALYSIS, the maximum) moves from your available balance to a hold. If the balance cannot cover it, the submit returns 402 INSUFFICIENT_CREDITS. The submit response shows credits as 0.2
Completed: capture
The charge is taken from the hold. A terminal poll and the webhook show it in
creditsCharged.3
Failed: release
The hold returns to your balance. A failed task costs
0.Check your balance
GET /v1/credits returns your account’s credits. Reading it costs nothing, so a program can check it before each batch. See Credit balance.
remainingis what you can spend now. Tasks you already submitted hold their price inreserved, so do not subtract them again.perCycleis what your plan grants each cycle, andcycleResetsAtis when the current cycle ends. Both arenullwithout an active plan.topUpBalancecounts the top-up credits withinremaining, with the date the next of them expire and how many do. It isnullwhen you have none. Top-up credits last three months from purchase, carry over renewals, and are spent after your plan’s credits.
403 SUB_ACCOUNT_FORBIDDEN, because a sub-account spends your credits. See Sub-accounts.
Check your usage
GET /v1/usage returns the credits your account was charged over a range of UTC dates, split by day, engine and API key as you choose. Reading it costs nothing. See Credit usage.
fromandtoare UTC dates, and both days are included. They default to the first day of the current UTC month and today. A range spans at most 366 days.groupBytakesday,engineandkey, separated by commas, and defaults today,engine. A row has the fields of the splits you chose, and a combination with no charge has no row.creditsandtasksat the top add up every row.groupBy=keyshows who spent the credits. A task sent with an API key has"source": "api"and anapiKeywith itsid,keyPrefix,nameandsubAccountId. Spend without an API key hassourceset tomonitor(a monitor’s runs),playgroundordashboard, andapiKeyisnull.- Usage adds up what tasks were charged, and a failed task costs
0. A monitor’s competitor read is charged without a task, so it lowers your balance but is not in usage. - Tasks of your sub-accounts are in your usage, and
apiKey.subAccountIdnames the sub-account that owns a key.GET /v1/sub-accounts/{id}/usagereads one sub-account. A sub-account’s key gets403 SUB_ACCOUNT_FORBIDDEN.
Check your queue
GET /v1/async/status returns your queued and processing tasks next to the concurrency limit they count against. Reading it costs nothing. See Queue status.
concurrency.usedisqueuedTasksplusprocessingTasks, the two counts that your plan’s concurrency limit adds together.maxis that limit, somax - usedis the room left for new tasks.priorityBreakdownlists the queued tasks by theprioritythey were submitted with, highest first.- The counts include the tasks of your sub-accounts, which share your limit. A sub-account’s key gets
403 SUB_ACCOUNT_FORBIDDENand reads its own task counts atGET /stats.
Plans
Compare plans on the pricing page.
Plan concurrency
The concurrency limit counts your account’sQUEUED and PROCESSING tasks together. It is not a limit on how fast you submit. A submit that would go over it returns 429 PLAN_CONCURRENCY_LIMIT with details.limit, details.active and Retry-After. A contract can set a different limit for your account, and a parent account can set one for a sub-account.
Per-key and sub-account limits
The key’s daily limit counts the hold a task needs, so a task is refused when
used + price would pass the limit.
Request rate and backpressure
Edge
429s come before the API and do not carry the JSON error envelope or Retry-After. Back off with exponential delay when you get one. A 429 or 503 from the task submit endpoints carries a Retry-After header in seconds. Codes and retry advice are in Errors.
Pace large submissions
1
Batch instead of looping
One
POST /v1/async/task/batch with 500 items is one request against the edge limit. For more than your concurrency limit, use POST /v1/batches: the server releases items as room frees up. See Batches and grids.2
Honor Retry-After
Wait the number of seconds in
Retry-After before you resubmit a refused task. Reuse the same idempotencyKey so a retry never creates a duplicate.3
Sequence dependent work
Execution order is not guaranteed. Wait for a task to complete before you submit work that depends on its result.
4
Watch your counts
GET /v1/async/status returns your queued and processing tasks next to your plan limit, so you can keep them under it. GET /stats adds the tasks that finished in the last 24 hours.