Browse documentation
Get started
See what a request costs, how far your balance goes and how to add credits.
On this page
How usage is charged
| Work | Billing basis |
|---|---|
| Google Search / YouTube Data | Per request. Each page or batch item is a request; search hits are not. |
| YouTube Download | Per byte delivered to your storage. |
| Balance, pricing, limits and usage reads | No query credits. Read limits still apply. |
Check balance and pricing
Use Billing in the console, or run these free checks. This example prices five Google Search requests without submitting them.
Use your saved CLI access. For a named profile, append --profile NAME to each command. These reads do not spend query credits.
flashdata account balance
flashdata account pricing --source google_search --request-count 5Requires Bash and cURL 7.76+. Skip the hidden key prompt if your environment already supplies FLASHDATA_API_KEY. Run the read commands in the same terminal.
# Bash: paste the key into a hidden prompt, not into this command.
read -r -s -p "FlashData API key: " FLASHDATA_API_KEY
printf '\n'
export FLASHDATA_API_KEY(
: "${FLASHDATA_API_KEY:?Set FLASHDATA_API_KEY first}"
curl --fail-with-body --silent --show-error --max-time 20 \
--header "X-API-Key: $FLASHDATA_API_KEY" \
'https://api.flashdata.dev/v2/api-access/balance' || exit
printf '\n'
curl --fail-with-body --silent --show-error --max-time 20 \
--header "X-API-Key: $FLASHDATA_API_KEY" \
'https://api.flashdata.dev/v2/api-access/pricing?source=google_search&request_count=5' || exit
printf '\n'
)Skip the hidden key prompt if FLASHDATA_API_KEY is already set. Run the read commands in the same terminal.
# PowerShell 7: paste the key into a hidden prompt.
$flashdataSecureKey = Read-Host "FlashData API key" -AsSecureString
$env:FLASHDATA_API_KEY = [System.Net.NetworkCredential]::new("", $flashdataSecureKey).Password
Remove-Variable flashdataSecureKey& {
$ErrorActionPreference = 'Stop'
if ([string]::IsNullOrWhiteSpace($env:FLASHDATA_API_KEY)) {
throw 'Set FLASHDATA_API_KEY first'
}
$flashdataHeaders = @{ 'X-API-Key' = $env:FLASHDATA_API_KEY }
$flashdataBase = 'https://api.flashdata.dev/v2'
$flashdataUri = "$flashdataBase/api-access/balance"
Invoke-RestMethod -Uri $flashdataUri `
-Headers $flashdataHeaders -TimeoutSec 20 -MaximumRedirection 0 |
ConvertTo-Json -Depth 20
$flashdataUri = "$flashdataBase/api-access/pricing?source=google_search&request_count=5"
Invoke-RestMethod -Uri $flashdataUri `
-Headers $flashdataHeaders -TimeoutSec 20 -MaximumRedirection 0 |
ConvertTo-Json -Depth 20
}Read the estimate
Use availableCredits from balance. In pricing, require available: true and read estimatedCredits. CLI JSON wraps each account response in data. The following price is illustrative; use the value returned for your account.
{
"requestCount": 5,
"prices": [
{
"source": "google_search",
"available": true,
"creditsPerRequest": 0.02,
"estimatedCredits": 0.1
}
]
}How many requests is 1 credit?
At 0.02 credits per search, 1 credit covers up to 50 Google searches. At 0.01 per metadata request, it covers up to 100 YouTube Metadata requests. These are alternative uses of one balance; use your returned prices when estimating.
| Example workload | Cost | Remaining |
|---|---|---|
| 50 Google searches | 50 × 0.02 = 1 credit | 0 credits |
| 100 YouTube Metadata requests | 100 × 0.01 = 1 credit | 0 credits |
| 20 Google searches + 30 metadata requests | 0.4 + 0.3 = 0.7 credits | 0.3 credits |
task cost = request count × creditsPerRequest
affordable requests = floor(availableCredits ÷ creditsPerRequest)YouTube Download uses bytes
With youtube_download permission, read creditsPerTb and bytesPerUnit. Cost = delivered bytes ÷ bytesPerUnit × creditsPerTb. estimatedCredits is null because a request count cannot predict delivered bytes.
flashdata account pricing --source youtube_downloadCredits after claiming
Check the owner balance after credential handoff. Approval lets the agent spend that shared balance; it does not buy credits, authorize checkout or create a separate per-agent spending cap.
| Stage | Which balance pays? |
|---|---|
| Temporary trial | Its own time-limited trial balance, for eligible sources. |
| Claimed by an existing account | Future requests use the owner's shared balance. Unused trial credits do not transfer. |
| Claimed after new signup | Normal signup eligibility applies. Claiming does not add another signup credit grant. |
Add credits
- In Billing, review the plan or top-up, total and renewal terms before completing checkout.
- After payment, check payment status and balance in Billing. A checkout redirect alone is not confirmation.
- Compare saved task usage with the same account date range and sources. Other keys may spend from this balance too.
If the numbers do not match
A balance or price read does not reserve credits. Check the actual query usage, other account activity and in-flight work. Usage summaries can lag behind recent queries or refunds; compare the same time range and source permissions. On 402, pause work and review the balance instead of creating another trial.