Skip to main content
Errors from /v1 are JSON. Branch on status and code; title and detail are for humans.

Shape

Validation errors (422) use the standard shape with a message and an errors map keyed by field:

Codes

insufficient_credits

Only AI work done by Neural Draft uses credits (blog posts, translations, ads, reels, App Capture). Content, page and image writes are free.

media_generation_moved

POST /v1/images with a prompt, image regeneration, and POST /v1/videos return 410. We don’t offer AI image or video creation. We craft finished static ads and reels for your brand. Uploading an image or registering one by URL still works.

Retry strategy

Retry only 429 and 5xx, with exponential backoff and jitter, at most 5 times, and always honour Retry-After.
The SDK throws ApiError with status, path and body (the raw JSON response; parse it for code). status: 0 means a network failure or timeout.

Idempotency

POST /v1/products, order updates and refunds, and POST /v1/checkout-sessions accept an Idempotency-Key header. A retry with the same key on the same route within 24 hours returns the original response instead of doing the work again.

Help

Email info@neuraldraft.io with the request method and URL, the response status and code, and the time (UTC).