Dành cho AI

Lỗi

One error shape for every endpoint. It says whether you were charged and whether to retry. Branch on code, never on message: message is a fixed sentence per code, and what exactly was wrong is in problems and param.

codeHTTPĐã tính phíThử lạiÝ nghĩaCần làm gì
invalid_params400khôngafter a fixA parameter is missing, has the wrong type or value, or the method is wrong. problems lists each one; param names the first.Fix what problems says, then send the request again.
max_price_exceeded400khôngafter a fixThe most this call could cost (required) is above X-Max-Price (or max_price), so it did not run.Raise the cap to at least required, ask for fewer items, or leave the cap out.
cursor_invalid400khôngkhôngThe cursor is not one this API issued, or it was issued to another account.Send page.next_cursor exactly as it came, or start the listing again without a cursor.
cursor_mismatch400khôngafter a fixThe cursor was sent to another endpoint, or with other parameters than the page it came from (view and fields may change).Resend with the endpoint and parameters of the page it came from.
unauthorized401khôngkhôngThe key is missing, malformed, revoked, disabled or expired (reason says which when known).Send Authorization: Bearer <key> with a live key; next_step says where to get one.
insufficient_balance402khôngafter a fixThe balance (available) cannot cover the most this call could cost (required).Top up at top_up_url, then send the same request again, unchanged.
key_budget_exceeded402khôngafter a fixThis call would take the key past its daily, monthly or total spending limit (reason says which).Wait for the day or month to turn (UTC), raise the limit in the console, or use another key.
account_suspended403khôngkhôngThe account this key belongs to is suspended, so none of its keys work.Hãy viết cho hello@okdata.online.
key_scope_denied403khôngkhôngThis key may not call this endpoint (its scope leaves it out).Use a key whose scope includes it, or widen the scope in the console.
unknown_endpoint404khôngkhôngNo endpoint lives at that path. When the path is close to one that does, moved_to (or suggestion) names it.Use moved_to when given; otherwise check the id against the catalog (the path is the id with dots turned into slashes under /v1).
not_found404once, if it reached the platformkhôngThe post, account or page does not exist or is not public. When the lookup reached the platform and was billed, or the endpoint's charge_when_not_found is above 0, this answer is charged: the body then says charged: true and amount.Kết quả cuối cùng; thử lại sẽ không thay đổi.
result_not_found404khôngkhôngNo kept result for this request ID on this account (it failed, or was never made).Check the request ID; only successful calls keep a result.
idempotency_conflict409khôngafter a fixThis Idempotency-Key was used in the last 24 h for a different request.Dùng key mới cho yêu cầu mới.
call_in_progress409khôngvới cùng Idempotency-KeyMột lần gọi với Idempotency-Key này vẫn đang chạy.Retry in a moment with the same key; you get its result, charged once.
cursor_expired410khôngkhôngThe cursor is older than the endpoint's cursor lifetime (page.cursor_expires_at said when).Start the listing again without a cursor, and skip the ids you already have.
result_expired410khôngkhôngThe result is older than 24 hours and was deleted.Gọi lại endpoint (tính phí như bình thường).
rate_limited429khôngyesThe account sent too many requests this minute (reason: rate) or has too many calls running (reason: concurrency).Wait retry_after_seconds (or for a running call to end), then send the same request.
cost_cap_exceeded429khôngyesTài khoản đã đạt hạn mức chi tiêu hằng ngày.Wait retry_after_seconds (the next UTC day), or write to us to raise it.
uncharged_cost_limit429khôngyesHôm nay có quá nhiều lượt gọi không tính phí (không tìm thấy gì).Check the ids you send; it opens again at the next UTC day.
settlement_unknown500unknown until looked upvới cùng Idempotency-KeyThe data came back, but the charge could not be confirmed.Resend with the same Idempotency-Key to get the result without paying again, or look it up at /v1/calls/{request_id}.
internal_error500khôngyesSomething went wrong on our side; nothing was charged.Thử lại với thời gian chờ tăng dần.
fetch_failed502once, if it reached the platformyesThe request failed even after we retried automatically on our side. If it reached the platform and the request was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise nothing is charged.Retry with backoff; check the status page if it persists.
cursor_unavailable502khôngyesA cursor can only be continued the same way the previous page was served, and that is not available right now.Retry later with the same cursor, or start the listing again without one.
busy503once, if it reached the platformyesThis endpoint is at capacity right now. If the request reached the platform and was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise nothing is charged.Thử lại với thời gian chờ tăng dần.
capability_paused503khôngyesEndpoint này hiện đang tạm dừng; không có gì được chạy.Kiểm tra /v1/catalog/status và thử lại khi đã hoạt động trở lại.
timeout504once, if it reached the platformyesThe data did not come back in time. If the request had reached the platform and was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise the hold is released.Thử lại với thời gian chờ tăng dần.

Thử lại an toàn

Send an Idempotency-Key with every call. The same key with the same request within 24 hours returns the stored result with meta.replayed: true and no new charge, so resending a call whose answer got lost never pays twice for the same result. The same key with a different request returns 409 idempotency_conflict.

Kết nối một lần, sau đó chỉ cần hỏi.

Mỗi khóa mới đi kèm $0.20 để dùng thử. Một câu là kết nối được agent của bạn.

Bắt đầu miễn phí
Kết nối AI của bạn

Dán câu này vào agent của bạn

Đọc https://okdata.online/agents.md và thiết lập okdata cho tôi; khóa của tôi nằm trong biến môi trường OKDATA_API_KEY.

Claude Code, Cursor, Codex và các agent khác có thể mở liên kết sẽ tự thiết lập từ đó.

MCP serverhttps://api.okdata.online/mcp