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
/estimateSupported 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
| Field | Type | Description |
|---|---|---|
estimated_credits | int | Credits the operation would cost. |
balance | int | Your current credit balance. |
sufficient | bool | Whether your balance covers the estimate. |
operation | string | The operation that was estimated. |
200 OK
{
"estimated_credits": 15,
"balance": 98,
"sufficient": true,
"operation": "research"
}