OpenSERP Cloud uses credits as the unit of billing. Every billable request consumes credits; credits do not expire. Top up in Top up.
The current baseline is $0.009 per credit. A standard single-engine search page is 1 credit, so 1,000 standard searches cost about $9 before top-up bonuses.
The current per-credit price and exact per-operation cost are always available live from the API, the pricing page, and the pricing dashboard - fetch from /v1/pricing instead of hardcoding values.
How requests turn into credits
| Operation | Credits per successful response |
|---|---|
Single-engine web search, /v1/{engine}/search |
1 per 10 results returned (ceil) — a standard ~10-result page is 1; deep queries (limit>10) bill proportionally |
Any/Fast web search, /v1/mega/search?mode=any|fast |
1 |
Any/Fast image search, /v1/mega/image?mode=any|fast |
1 |
Single-engine image search, /v1/{engine}/image |
Scales with returned image volume |
Balanced megasearch, /v1/mega/search?mode=balanced |
Dynamic — depends on successful engines |
Balanced mega image search, /v1/mega/image?mode=balanced |
Dynamic — depends on engines and image volume |
Account, pricing, status, and capability endpoints (/v1/me, /v1/pricing, /v1/engines/*) |
0 |
For dynamic charges, the response is the source of truth — read X-Credits-Used (or client.lastResponse?.credits?.used) on every billable call.
Reading live pricing
/v1/pricing returns the current per-credit price and per-operation cost in one call:
const pricing = await client.pricing();
console.log(pricing.credit_price_usd);
console.log(pricing.search.credits, pricing.fast_search.credits);
curl https://api.openserp.org/v1/pricing \
-H "Authorization: Bearer $OPENSERP_KEY"
{
"credit_price_usd": 0.009,
"search": { "credits": 1 },
"mega_search": { "credits": 1 },
"image_search":{ "credits": 1 },
"any_search": { "credits": 1 },
"fast_search": { "credits": 1 },
"any_image": { "credits": 1 },
"fast_image": { "credits": 1 }
}
If your app displays expected cost to your own users, fetch /v1/pricing periodically instead of hardcoding a rate.
Top-up bonuses
Volume top-ups add bonus credits, starting at +5% from $15. Alpha founder accounts get an additional +15% credits on every top-up, stacked with volume bonuses and capped so the effective credit price never drops below half of list price.
What counts as billable
You are charged only when the API successfully performs a search.
| Response | Billed? |
|---|---|
200 OK with results |
Yes |
200 OK with an empty results array |
Yes |
400 Bad Request |
No |
401 Unauthorized |
No |
402 Payment Required |
No |
429 Too Many Requests |
No |
5xx service errors |
No |
For balanced mega endpoints, the final charge depends on which engines succeeded and how many results they returned. For Any/Fast endpoints, an all-engines-failed response is 502 and isn’t charged.
Reading credit usage
Every billable response includes:
| Header | Meaning |
|---|---|
X-Credits-Used |
Credits charged for this request |
X-Credits-Remaining |
Account balance after the request |
X-Engine-Used |
Engine used by Any/Fast routing |
With the JavaScript SDK:
const response = await client.fastSearch({
text: "openserp api",
engines: ["google", "bing"],
});
console.log("results:", response.results.length);
console.log("used:", client.lastResponse?.credits?.used);
console.log("remaining:", client.lastResponse?.credits?.remaining);
console.log("engine:", client.lastResponse?.engineUsed);
With raw fetch:
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.OPENSERP_KEY}` },
});
console.log("used:", res.headers.get("X-Credits-Used"));
console.log("remaining:", res.headers.get("X-Credits-Remaining"));
console.log("engine:", res.headers.get("X-Engine-Used"));
If you pass costs through to your own users, log X-Credits-Used per request and reconcile against the dashboard.
Running out of credits
When your balance reaches zero, billable calls return 402 Payment Required:
{
"error": "insufficient_credits",
"code": 402,
"message": "Insufficient credits. Top up to continue."
}
The response is not charged. Top up in Top up — credits are available immediately after payment.
To avoid interruptions:
- Watch
X-Credits-Remainingin production jobs and alert below a threshold. - Keep a balance buffer for scheduled or high-volume searches.
- Prefer Any/Fast endpoints when predictable 1-credit billing matters more than merged coverage.
Next
- Endpoints reference — paths and parameters.
- Errors & rate limits — retry behavior and status codes.