Costs & Credits
Fresh Source: docs.airtop.aiAirtop uses a credit-based billing system. Credits cover AI processing, CPU time, and proxy bandwidth — not tokens.
What Costs Credits
| Resource | Cost Driver |
|---|---|
| Sessions | Billed per 30-second increment of running time |
| AI operations | pageQuery, scrapeContent, fillForm, monitor, etc. |
| Proxy bandwidth | Data transferred through residential proxies |
| Captcha solving | Built-in solver attempts |
Cost Controls
Set limits to prevent runaway spending on individual operations or sessions.
Per-Operation Limits
typescript
const result = await client.windows.pageQuery(sessionId, windowId, {
prompt: 'Extract all product data',
configuration: {
costThresholdCredits: 10, // Max 10 credits for this operation
timeThresholdSeconds: 30, // Max 30 seconds for this operation
},
});python
result = client.windows.page_query(
session_id, window_id,
prompt="Extract all product data",
configuration={
"costThresholdCredits": 10,
"timeThresholdSeconds": 30,
}
)Per-Session Limits
typescript
const session = await client.sessions.create({
configuration: {
timeoutMinutes: 10, // Session auto-terminates after 10 minutes
},
});python
session = client.sessions.create(
configuration={"timeoutMinutes": 10}
)Cost Optimization Tips
1. Terminate Sessions Promptly
Sessions bill per 30-second increment. Always terminate when done.
typescript
try {
// ... your operations
} finally {
await client.sessions.terminate(sessionId);
}2. Reuse Sessions for Multiple Operations
Opening a new session for each URL is wasteful. Use multiple windows in one session.
typescript
// Efficient: one session, multiple windows
const session = await client.sessions.create({ configuration: { timeoutMinutes: 15 } });
const sessionId = session.data.id;
for (const url of urls) {
const window = await client.windows.create(sessionId, { url });
await client.windows.scrapeContent(sessionId, window.data.windowId);
await client.windows.close(sessionId, window.data.windowId);
}
await client.sessions.terminate(sessionId);3. Use scrapeContent Instead of pageQuery When Possible
scrapeContent is cheaper than pageQuery because it doesn't require LLM inference for the extraction itself.
4. Set Cost Thresholds
Always set costThresholdCredits and timeThresholdSeconds in production to prevent unexpected costs.
5. Batch Operations Efficiently
Use appropriate maxConcurrentSessions — more parallelism = faster but more concurrent session billing.
Monitoring Usage
Check your credit usage in the Airtop Dashboard:
- Usage tab — current period credit consumption
- Session history — per-session cost breakdown
- API logs — per-operation credit usage
Best Practices
- Always use try/finally for session cleanup
- Set timeouts as safety nets against runaway sessions
- Use cost thresholds on all production AI operations
- Monitor dashboard regularly for unexpected usage patterns
- Test with small batches before scaling up operations