Advanced APIs

Credit estimate

Check what an operation will cost, and whether your balance covers it, before spending any credits.

Overview

Estimate accepts the same parameters as the operation you plan to run, nested under an operation key. It never charges credits.

POST/estimate

Supported operations: search, extract, structure, research, map, crawl, domain, monitor_run.

Request

Request
curl https://api.ohsee.tech/estimate \
  -H "Authorization: Bearer ohsee-<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "research",
    "research": { "query": "...", "research_depth": "standard" }
  }'
Nest the target operation's parameters under a key matching operation, for example { "operation": "search", "search": { ... } }.

Response

FieldTypeDescription
estimated_creditsintCredits the operation would cost.
balanceintYour current credit balance.
sufficientboolWhether your balance covers the estimate.
operationstringThe operation that was estimated.
200 OK
{
  "estimated_credits": 15,
  "balance": 98,
  "sufficient": true,
  "operation": "research"
}