Error Codes

What each error code means, whether you were charged, and how to fix it.

Every error response is JSON with a non-2xx HTTP status. Where the API distinguishes a specific cause it also returns a machine-readable code field — check that first, then fall back to the HTTP status.

#Common error codes

HTTPCodeMeaningFix
400INVALID_INPUTBlank question or malformed birthDetailsSend a non-empty question and a valid chart (all four birthDetails fields).
401UNAUTHORIZEDNo API key was sentSend the key as x-api-key or Authorization: Bearer.
401INVALID_FORMATThe key is not in the expected formatUse the full key from your dashboard, not a documentation placeholder.
401INVALID_API_KEYThe key is unknown or inactiveCheck the key in your dashboard and the header you send it in.
401KEY_EXPIREDThe API key has expiredGenerate a new key from your dashboard.
402INSUFFICIENT_BALANCEWallet balance is too low for this callAdd funds to your wallet — see Pricing.
403TEST_KEY_REJECTEDA vk_test_ key was used on productionUse a vk_live_ key for production, or use the sandbox with a sandbox key.
403SUBSCRIPTION_INACTIVEThe account or subscription is not activeCheck your account status in the dashboard or contact support.
403SWIFT_PLAN_REQUIREDspeed:"fast" (Vedika Swift) was requested on a Starter or Professional plan. Nothing is charged.Vedika Swift is included on Business, Enterprise and Flagship. Upgrade at Pricing, or omit speed to use Vedika Standard.
429RATE_LIMIT_EXCEEDEDPer-minute rate limit exceeded for your plan tierBack off and retry after the Retry-After header — see Rate Limits.
429DAILY_LIMIT_EXCEEDEDDaily call limit for your plan reachedRetry after the Retry-After delay, or move to a higher plan.
429IP_BLOCKEDToo many failed authentication attempts from this IP addressFix the key being sent, then retry after the Retry-After delay.
503ECO_UNAVAILABLEThe requested engine is temporarily unavailable (e.g. speed:"eco")Retry with backoff, or fall back to another tier.
503SERVICE_UNAVAILABLEBilling or a dependency is temporarily unavailableRetry with exponential backoff.

#Billing on error

Note
Billing is fail-closed: no answer is ever returned unless the charge is reserved and settled. A 400 on bad input is rejected before any wallet reservation runs, so malformed requests are never charged.

#Retries & idempotency

Send an Idempotency-Key header on writes you might retry. A repeated request with the same key reuses the original charge instead of billing twice — safe to retry after a timeout or a dropped connection.

curl -s https://api.vedika.io/api/v1/astrology/query \
  -H "x-api-key: $VEDIKA_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 8f14e45f-b710-4a15-9c1e-0f6d2a5c9b31" \
  -d '{ "question": "...", "birthDetails": { "...": "..." } }'