You are integrating the WayShot digi image API.
Base URL: https://api.platform.wayshot.ai
Auth: header "Authorization: Bearer $WAYSHOT_API_KEY".
1) Create a job: POST /v1/jobs with JSON
{ "capability":"digi", "image":"",
"params":{ "resolution":"1K" } }
→ returns { job_id, status:"queued" }.
2) Poll GET /v1/jobs/{job_id} with backoff 2s,5s,10s until
status is succeeded | failed | rejected.
3) On succeeded, read output.url (JPEG). Only succeeded is billed.
4) Handle errors: 401 invalid_api_key, 402 insufficient_balance,
422 image_unavailable / content_rejected, 429 rate_limited (Retry-After),
503 model_unavailable.
Read the key from env WAYSHOT_API_KEY. Return the output URL.