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 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.
403LANGUAGE_PLAN_REQUIREDA Starter key asked for a language outside English and the ten included Indian languages (Hindi, Bengali, Telugu, Tamil, Gujarati, Kannada, Malayalam, Marathi, Punjabi, Odia). Nothing is charged.All 30 languages are included from Professional. Upgrade at Pricing, or send one of the included language codes. Starter keys are held to this from 20 Nov 2026.
422IDEMPOTENCY_NOT_SUPPORTEDA retry key was sent to an endpoint that does not accept one. Nothing is charged.Send the request again without Idempotency-Key, X-Idempotency-Key or your own X-Request-Id. See Retries & idempotency.
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

Every successful call is charged, including a repeat request for a chart you already fetched. Store results you will show again on your side.

To retry after a timeout or a dropped connection without paying twice, send an Idempotency-Key header to an endpoint that accepts one: the AI query and batch endpoints, the tithi, nakshatra, yoga and karana endpoints, the dasha endpoints, ashtakoota matching and the Vastu calculation routes. A retry with the same key and body within 24 hours reuses the original charge. The full list is in the API reference.

Most other chart endpoints, including birth chart, kundli, panchang, horoscope and the matrimony routes, refuse a retry key with 422 IDEMPOTENCY_NOT_SUPPORTED. Nothing is charged; send the request again without Idempotency-Key, X-Idempotency-Key or your own X-Request-Id.

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