Skip to content
KrevayadocsGet help Open Krevaya

API errors, rate limits, and retry behavior

Diagnose 401, 403, 409, 422, 429, render failures, MCP tool errors, and GraphQL errors without creating duplicate posts or exceeding shared quotas.

Updated

One account budget across three interfaces

REST /v1, MCP, and GraphQL share a budget of 120 requests per minute per account. Creating another key or switching interfaces does not create another allowance. Requests that require generate also consume an hourly generation budget of 40 scope checks per account. A compound operation can pass more than one generate check, so do not treat this as a guaranteed number of completed jobs.

LimitResponse or behavior
Shared account request budgetHTTP 429; Retry-After: 60
Generate-scope budgetREST: HTTP 429 with Retry-After: 3600; MCP: inspect the tool error
Plan or feature entitlementUsually 403 with a corrective detail; not fixed by waiting one minute
Storage, post, or credit allowanceOperation-specific refusal; check get_usage and the returned detail
Posting limit for a connected account, or a platform's shared daily budgetHTTP 429 with code posting_cap or platform_budget, next_window, and Retry-After when known; MCP: the tool error says when
Active API keysMaximum 10; revoke an unused key before creating another
Webhook endpointsMaximum 5
Concurrent video exportsOne per account
Video export minutes and daily exportsHTTP 429 with code export_minutes_exhausted or export_daily_cap and a detail that says what is left and when it resets; check get_usage
Audio hours for captions, video edits and Auto cutHTTP 429 with code speech_hours_exhausted or speech_daily_cap and the same kind of detail; waiting a minute does not help
Video edit proposalsOne running per account; a daily video-processing limit per account

Match the response to the next action

StatusLikely causeNext step
400Invalid source, unsupported media, unsafe URL, unknown brand, or other input ruleRead detail; correct the input before retrying
401Missing, invalid, revoked, or expired credential; inactive ownerCheck the stored key or complete OAuth sign-in again
403Missing scope or current plan/feature entitlement; approving or scheduling a Pinterest, TikTok, Tumblr or YouTube draftCompare scopes and feature availability; do not rotate blindly. A person approves Pinterest, TikTok, Tumblr and YouTube posts in Krevaya
403 with the plain text body error code: 1010The network edge refused the request's User-Agent before it reached the API. The default User-Agent of Python's built-in urllib is refused; curl, requests, and httpx defaults are acceptedSend a descriptive User-Agent header such as my-app/1.0. The key and the request body are not the problem
404Owned resource was not found; on /v1/automation routes, also an unknown brandCheck the returned ID and account; foreign records are not discoverable
409Schedule collision, stale layout/memory version, a post that can't be scheduled in its current state, an Idempotency-Key reused with a different body, or a platform Krevaya has paused (code platform_paused)Choose another slot, or read current state before editing; use a new Idempotency-Key only for a new post
410Automation routes only: the draft behind an Idempotency-Key was deleted, or an event cursor is older than 30 daysFollow the detail; reconcile with the posts list before resetting an event cursor
422Request schema validation, text over a platform's caption limit, or, on POST /v1/posts/{post_id}/schedule, a schedule_at that is past or lacks a UTC offsetInspect field-level detail and correct types, bounds, or missing values
429Account or generation throttle, or a posting limitWait at least Retry-After, then back off with jitter
502Creation rendering failedKeep the existing draft ID and retry rendering after checking state
503A temporary outage, such as a busy job queue (Retry-After: 15) or paused AI generationTry again later

Read the error format for your interface

REST errors normally contain detail, which can be a string or structured validation list. MCP tools can fail inside HTTP 200 with result.isError: true and an explanatory content block; envelope errors use error. GraphQL execution failures can also use HTTP 200, with an errors array. Check the appropriate envelope before reporting success.

Retry only when the operation is understood

  • For a throttled read, honor Retry-After and add a small random delay so workers do not restart together.
  • For a write with a clear validation or permission error, change the request or access first.
  • For an unknown write outcome after a network failure, repeat POST /v1/posts or POST /v1/automation/drafts only with the same Idempotency-Key, which returns the original result instead of a duplicate. For other writes, including /v1/generate and asset imports, reconcile the existing post, asset, or job before repeating it.
  • For stale memory or layout, fetch the current version and reapply only the intended changes.
  • For a long-running job, retain job_id and poll; a client deadline does not cancel the server job.

Set separate timeouts for quick reads and synchronous generation. Centralize concurrency in your integration so independent workers share the account budget. Record the method, path or tool name, safe input summary, HTTP status, response detail, and relevant resource IDs; exclude tokens, signing secrets, and private source text.

Keep document and publishing limits separate

A Canvas document can have 20 pages and 160 layers per page, while a platform may accept fewer attachments. For example, a 20-page creation cannot become one 20-item Instagram carousel, whose limit is 10. Upload size, video export duration, and platform publishing restrictions are also separate checks. Passing one does not imply the next will succeed.

Frequently asked questions

Can I get a separate rate limit for each API key?

No. The request and generation budgets are per account and shared across keys, REST, MCP, and GraphQL.

What should I do with a 409 stale-layout error?

Read the latest layout and version, then reapply the intended edit. Changing only the version number on an old layout can overwrite someone else's work.