DescrAIber API
Base URL: https://coderai.dev/descraiber/api
Fetch a fresh Shopify ID token for each request and send it in Authorization: Bearer <token>.
POST /generate-description
JSON fields: productTitle (1–300 characters), imageUrl (Shopify HTTPS image), locale (default en), existingDescription, and optional styleOptions. Requests are bounded to 2 MiB; only the first 12,000 source-description characters are sent to AI.
Style options: tone professional/casual/luxury; length short/medium/detailed; focus balanced/features/benefits/storytelling.
Returns {description, modelUsed}. No product is saved by this endpoint. Confirmed provider failures are refunded; uncertain interrupted outcomes stay charged. A successful description is returned even if final quota confirmation is temporarily unavailable.
GET /usage/status
Returns the Shopify-verified plan, used, quota, remaining and periodStartAt. Free: 10/month; Pro: 200/month; Unlimited: no monthly cap. Three concurrent generations per shop. Five confirmed invalid-input failures (provider HTTP 400, 413 or 422) per UTC day; in-flight calls reserve failure capacity. Provider outages instead cause a 60-second cooldown, shared by concurrent failures. Status includes failedAttemptsToday, failureLimit, providerCooldownUntil and failureBudgetResetsAt; the latter reflects the active cooldown or daily budget reset. Unknown interrupted outcomes remain monthly-charged without incrementing the daily invalid-input count. Successful Unlimited calls have no daily quota.
POST /plan/sync
Refreshes and returns the Shopify-verified plan. It does not accept a client-supplied plan.
Shop privacy cleanup
Shopify-authenticated POST /shop/redact returns {data_deleted:false,pending:true,scheduledFor} after durably scheduling deletion 29 days after first local receipt. Duplicate deliveries retain that deadline. Later usage or generation that Shopify verifies cancels the pending request. The native per-shop alarm removes only that shop's legacy records and stored state. Cleanup failures retry hourly for at most 24 attempts within the remaining day; a persistent outage leaves an exhausted pending record and logs that operator inspection is required. Uninstall notifications do not immediately delete usage.
Errors: 400 invalid input; 401 expired/invalid token; 403 shop mismatch; 429 monthly quota; 502 AI provider failure; 503 temporary unavailability, concurrency limit or PROVIDER_FAILURE_BUDGET. The failure-budget response includes Retry-After and failureReason: CLIENT_INPUT or PROVIDER_COOLDOWN.
Plan changes and prices are managed in Shopify. Legacy plan/mirror, usage/increment, internal/session and signing/debug endpoints are unavailable.