{"openapi":"3.0.3","info":{"title":"EcomAiTool API","version":"1.0.0","description":"\nUse EcomAiTool tools from your own apps, scripts and spreadsheets.\n\n**Authentication:** send an API key from the *API keys* page as `Authorization: Bearer <key>`.\nWhen you're signed in to EcomAiTool, **Try it out** here uses your session automatically.\n\n**Plans:** API keys work on every plan except **Basic**. On Basic, requests with a key return\n**`403 Forbidden`**; upgrade to Pro or Business on [https://www.ecomaitool.com/plans](https://www.ecomaitool.com/plans).\n\n**Responses** all share one envelope:\n\n```json\n{\n  \"name\": \"OK\",\n  \"status\": \"success\",\n  \"code\": 200,\n  \"data\": { },\n  \"meta\": { \"version\": 1, \"timestamp\": \"2026-10-21T18:23:04.460Z\" }\n}\n```\n\nErrors have `\"status\": \"error\"` and an `error` object (`message`, optional `details`) instead of `data`.\n\n**Credits:** each Meesho Ship Saver generation costs 1 credit from your balance, the same balance the\nwebsite uses. If a generation fails, the credit comes back. Check it any time with `GET /api/v1/credits/balance`.\n\n**Out of credits:** starting a generation returns **`402 Payment Required`** with\n`error.details.reason: \"insufficient_credits\"`, your `balance` and a `buy_url`. Buy more at\n[https://www.ecomaitool.com/plans](https://www.ecomaitool.com/plans), then retry the same request.\n\n**Typical flow:** find a category with `GET /api/v1/meesho-categories?q=…`, start a generation with\n`POST /api/v1/meesho-image-runs`, then poll `GET /api/v1/meesho-image-runs/{id}` until it's `completed`.\n","contact":{"email":"support@ecomaitool.com"}},"servers":[{"url":"/","description":"This site"}],"tags":[{"name":"Meesho Ship Saver","description":"Find the product image with the lowest Meesho shipping charge. A generation (run) makes 20 versions of your photo (framed and frameless) and gets the real shipping charge Meesho quotes for each. Runs wait in a queue and are priced in the background; poll `GET /{id}` for progress and results."},{"name":"Meesho Categories","description":"The Meesho categories Ship Saver supports: leaf (sub-sub) categories with Meesho's own ids. Pass a category's `id` when you start a generation."},{"name":"Credits","description":"Your credit wallet, shared by the website and the API. Each Ship Saver generation costs 1 credit, whether it's started on the site or through the API, and the credit comes back if the generation fails."},{"name":"Account","description":"The account that owns the session or API key."}],"paths":{"/api/v1/meesho-image-runs":{"get":{"tags":["Meesho Ship Saver"],"operationId":"listMeeshoImageRuns","summary":"List your generations","description":"Newest first. Runs are returned without `results`.","security":[{"ApiKey":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":12}}],"responses":{"200":{"description":"A page of runs.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/MeeshoImageRun"}},"total":{"type":"integer","example":27},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":12}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"tags":["Meesho Ship Saver"],"operationId":"createMeeshoImageRun","summary":"Start a generation","description":"**Costs 1 credit** (from the same balance as the website); the credit comes back if the generation fails or finds no image with lower shipping than the original. Queues a run (`status: queued`). It's priced in the background: poll `GET /{id}` until it's `completed` or `failed`. You can have 10 runs queued or processing at a time.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image","sscats","price"],"properties":{"image":{"type":"string","format":"binary","description":"Product photo: PNG, JPG or WEBP, up to 10 MB."},"sscats":{"type":"string","description":"JSON array of 1–3 category ids from `GET /api/v1/meesho-categories`, e.g. `[10000]` or `[{\"id\": 10000}]`.","example":"[10000]"},"price":{"type":"number","description":"Selling price in ₹.","example":499},"remove_background":{"type":"boolean","default":false,"description":"Optional. Cut the product out of its background for some variants (on white or a soft studio backdrop). Off by default: every variant keeps the original background. Generate More uses the same setting.","example":true},"target_shipping":{"type":"number","description":"Optional. Keep adding rounds of 20 variants, up to 5, until one ships at or under this (₹). Credits for every round are held when it starts (as many as your balance allows); you're charged 1 per round run, whether or not the target is reached, and the rest is returned. A round that fails isn't charged.","example":150}}}}}},"responses":{"201":{"description":"The queued run.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"Created"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":201},"data":{"$ref":"#/components/schemas/MeeshoImageRun"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-image-runs/{id}":{"get":{"tags":["Meesho Ship Saver"],"operationId":"getMeeshoImageRun","summary":"Get a generation with its results","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"}}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/MeeshoImageRun"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"tags":["Meesho Ship Saver"],"operationId":"deleteMeeshoImageRun","summary":"Delete a generation","description":"Also stops it if it's still being priced.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","example":true}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-image-runs/{id}/again":{"post":{"tags":["Meesho Ship Saver"],"operationId":"generateMoreMeeshoImages","summary":"Generate more for the same generation","description":"**Costs 1 credit.** Adds another round of 20 variants to **this** generation (same photo, categories and price): it goes back to `queued`, keeps every result it already has, and the new variants are numbered after them. Poll `GET /{id}` as before. Only when it isn't already queued or processing. If the round fails, the generation stays `completed` with its earlier results, `error` says why and the credit comes back. A round that finds nothing below the original's shipping is free too.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"}}],"responses":{"200":{"description":"The same generation, queued again.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/MeeshoImageRun"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-image-runs/{id}/retry":{"post":{"tags":["Meesho Ship Saver"],"operationId":"retryMeeshoImageRun","summary":"Try a failed generation again","description":"**Costs 1 credit**, refunded the same way as a new generation. Only for `status: failed`: runs it again from the start with the same categories, price and options (a target search becomes a single round). A Meesho error is already retried once automatically before a run fails. The run keeps its photo for 2 days after failing; once it's gone (`photo_kept: false` on `GET /{id}`), send the photo again as multipart `image`, or the call fails with `details.photo_needed: true`.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"}}],"requestBody":{"required":false,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"Only when the photo is gone."}}}}}},"responses":{"200":{"description":"The same generation, queued again.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/MeeshoImageRun"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-image-runs/{id}/image":{"get":{"tags":["Meesho Ship Saver"],"operationId":"getMeeshoImageRunImage","summary":"Download one of a generation's images","description":"Returns the exact file Meesho stored (not re-encoded). `url` must be the run's `input_image_url` or one of its result `image_url`s.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri","example":"https://images.meesho.com/images/catalogs/123/abc_512.jpg","description":"Meesho CDN URL."}}],"responses":{"200":{"description":"The image file.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-worker/status":{"get":{"tags":["Meesho Ship Saver"],"operationId":"getShipSaverStatus","summary":"Pricing status","description":"Whether Meesho pricing is online, and how many runs are waiting.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Status.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"type":"object","properties":{"online":{"type":"boolean","example":true},"queued_runs":{"type":"integer","example":2}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-categories":{"get":{"tags":["Meesho Categories"],"operationId":"listMeeshoCategories","summary":"Search or list categories","description":"With `q`: search (every word must match the name or path; up to 25, best matches first). Without `q`: every category, A–Z by path, a page at a time.","security":[{"ApiKey":[]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":2,"example":"tshirt"}},{"name":"page","in":"query","description":"Without `q` only.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","description":"Without `q` only.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"With `q`: matching categories. Without: a page of all categories.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/MeeshoCategory"}},{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/MeeshoCategory"}},"total":{"type":"integer","example":3785},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":50}}}]},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/meesho-categories/{id}":{"get":{"tags":["Meesho Categories"],"operationId":"getMeeshoCategory","summary":"Get a category","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":10000}}],"responses":{"200":{"description":"The category.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/MeeshoCategory"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/credits/balance":{"get":{"tags":["Credits"],"operationId":"getCreditBalance","summary":"Get your credit balance","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Your balance.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/CreditBalance"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/credits/transactions":{"get":{"tags":["Credits"],"operationId":"listCreditTransactions","summary":"List credit changes","description":"Newest first: signup credits, generations (site or API) and refunds.","security":[{"ApiKey":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":12}}],"responses":{"200":{"description":"A page of changes.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransaction"}},"total":{"type":"integer","example":6},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":12}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/account/me":{"get":{"tags":["Account"],"operationId":"getAccount","summary":"Get your account","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Your account.","content":{"application/json":{"schema":{"type":"object","required":["name","status","code","data","meta"],"properties":{"name":{"type":"string","example":"OK"},"status":{"type":"string","enum":["success"]},"code":{"type":"integer","example":200},"data":{"$ref":"#/components/schemas/Account"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"An API key from the API keys page in your dashboard."}},"schemas":{"Meta":{"type":"object","required":["version","timestamp"],"properties":{"version":{"type":"integer","example":1},"timestamp":{"type":"string","format":"date-time","example":"2026-10-21T18:23:04.460Z"}}},"Error":{"type":"object","required":["name","status","code","error","meta"],"properties":{"name":{"type":"string","example":"Bad Request"},"status":{"type":"string","enum":["error"]},"code":{"type":"integer","example":400},"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"MeeshoRate":{"type":"object","required":["sscat_id","shipping"],"properties":{"sscat_id":{"type":"integer","example":1765},"shipping":{"type":"number","description":"Meesho shipping charge in ₹.","example":66},"duplicate_pid":{"nullable":true,"description":"Meesho product the image matched, if any.","oneOf":[{"type":"integer"},{"type":"string"}]}}},"MeeshoRunResult":{"type":"object","required":["image_url","variant","sscat_id","shipping"],"properties":{"image_url":{"type":"string","format":"uri","example":"https://images.meesho.com/images/catalogs/123/abc_512.jpg","description":"Meesho CDN URL."},"variant":{"type":"integer","example":12},"style":{"type":"string","enum":["clean","tone","shadow","soft","blur","studio","caption","stamp","frame","glow","banner","badge"],"description":"How the image was made, lightest edit first. clean, tone, shadow, soft, blur, studio and caption have no border or sticker; one of those at or under ₹75 ranks first even over a cheaper framed one. Otherwise lowest shipping first, lighter edits first at equal shipping.","example":"frame"},"cutout":{"type":"boolean","description":"Drawn from the product cut out of its background.","example":false},"sscat_id":{"type":"integer","example":1765},"shipping":{"type":"number","description":"Meesho shipping charge in ₹.","example":66},"duplicate_pid":{"nullable":true,"description":"Meesho product the image matched, if any.","oneOf":[{"type":"integer"},{"type":"string"}]}}},"MeeshoImageRun":{"type":"object","properties":{"id":{"type":"string","example":"6717b5e2c4a1f2d3e4f5a6b7"},"status":{"type":"string","enum":["queued","processing","completed","failed"],"example":"processing"},"queue_position":{"type":"integer","description":"Runs ahead of this one. Only on `GET /{id}` while `queued`.","example":2},"progress":{"type":"object","description":"Images priced so far: the original plus 20 variants.","properties":{"done":{"type":"integer","example":23},"total":{"type":"integer","example":21}}},"interrupted":{"type":"boolean","description":"Pricing stopped part-way; it restarts automatically.","example":false},"file_name":{"type":"string","example":"navy-kurti.jpg"},"input_image_url":{"type":"string","format":"uri","example":"https://images.meesho.com/images/catalogs/123/abc_512.jpg","description":"The original image as Meesho stored it."},"price":{"type":"number","description":"Selling price in ₹.","example":499},"image_count":{"type":"integer","example":20},"sscats":{"type":"array","items":{"$ref":"#/components/schemas/MeeshoCategory"}},"original_rates":{"type":"array","items":{"$ref":"#/components/schemas/MeeshoRate"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/MeeshoRunResult"},"description":"Only on `GET /{id}`. Grows while the run is processing."},"best":{"nullable":true,"type":"object","properties":{"image_url":{"type":"string","format":"uri","example":"https://images.meesho.com/images/catalogs/123/abc_512.jpg","description":"Meesho CDN URL."},"shipping":{"type":"number","description":"Meesho shipping charge in ₹.","example":66},"sscat_id":{"type":"integer","example":1765}}},"no_lower_shipping_found":{"type":"boolean","example":false},"credits_charged":{"type":"integer","description":"Credits this generation cost (or holds, while a target search runs).","example":1},"remove_background":{"type":"boolean","description":"Some variants show the product cut out of its background (on white or a soft studio backdrop).","example":true},"target_shipping":{"type":"number","nullable":true,"description":"The target, if one was set.","example":150},"target_status":{"type":"string","nullable":true,"enum":["searching","reached","not_reached"],"example":"searching"},"target_round":{"type":"integer","nullable":true,"description":"Current round of the target search.","example":2},"target_rounds_max":{"type":"integer","nullable":true,"description":"Rounds the search can use (credits held).","example":5},"credit_refunded":{"type":"boolean","description":"The credit came back: the round failed, or found nothing below the original's shipping.","example":false},"error":{"type":"string","description":"Why it failed (technical text; the site shows a plain explanation).","example":"Meesho did not price any of the generated images."},"photo_kept":{"type":"boolean","description":"Failed runs (GET /{id} only): the photo is still stored, so retry needs no new upload.","example":true},"created_at":{"type":"string","format":"date-time","example":"2026-10-21T18:23:04.460Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-10-21T18:23:04.460Z"}}},"MeeshoCategory":{"type":"object","required":["id","name","path"],"properties":{"id":{"type":"integer","description":"Meesho sub-sub-category id.","example":10000},"name":{"type":"string","example":"Tshirts"},"path":{"type":"string","example":"Men Fashion › Mens Clothing › Men Top Wear › Tshirts"}}},"CreditBalance":{"type":"object","required":["balance","unit"],"properties":{"balance":{"type":"integer","minimum":0,"example":4},"unit":{"type":"string","enum":["credits"]},"updated_at":{"type":"string","format":"date-time","example":"2026-10-21T18:23:04.460Z"}}},"CreditTransaction":{"type":"object","properties":{"id":{"type":"string","example":"6717c0a1b2c3d4e5f6a7b8c9"},"amount":{"type":"integer","description":"Credits added (+) or used (−).","example":-1},"reason":{"type":"string","enum":["signup","generation","refund"],"example":"generation"},"source":{"type":"string","enum":["site","api"],"description":"Where the generation was started.","example":"api"},"run_id":{"type":"string","nullable":true,"example":"6717b5e2c4a1f2d3e4f5a6b7"},"balance_after":{"type":"integer","example":4},"created_at":{"type":"string","format":"date-time","example":"2026-10-21T18:23:04.460Z"}}},"Account":{"type":"object","required":["id","plan","balance"],"properties":{"id":{"type":"string","description":"Your user id.","example":"user_2abcDEF123ghiJKL456"},"email":{"type":"string","format":"email","nullable":true,"example":"seller@example.com"},"name":{"type":"string","nullable":true,"example":"Demo Seller"},"plan":{"type":"string","description":"Your current plan.","example":"Starter"},"role":{"type":"string","nullable":true,"description":"\"admin\" for admins, otherwise null.","example":null},"balance":{"type":"integer","description":"Credits left.","example":5},"created_at":{"type":"string","format":"date-time","example":"2026-10-01T00:00:00.000Z"}}}},"responses":{"BadRequest":{"description":"The request is invalid. `error.details.field` names the field to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Bad Request","status":"error","code":400,"error":{"message":"Attach a product photo as `image`.","details":{"field":"image"}},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"Unauthorized":{"description":"No signed-in session or valid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Unauthorized","status":"error","code":401,"error":{"message":"Sign in, or send an API key in the Authorization header as `Bearer <key>`."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"PaymentRequired":{"description":"**Out of credits.** Your balance is lower than the 1 credit a generation costs. Buy more on the [Plans page](https://www.ecomaitool.com/plans), then retry. `error.details` has your `balance`, the credits `required` and the `buy_url`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Payment Required","status":"error","code":402,"error":{"message":"Your credits have run out. Buy more at https://www.ecomaitool.com/plans to keep generating.","details":{"reason":"insufficient_credits","balance":0,"required":1,"buy_url":"https://www.ecomaitool.com/plans"}},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"Forbidden":{"description":"Not allowed to do this, e.g. an API key on the Basic plan (no API access).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Forbidden","status":"error","code":403,"error":{"message":"You don't have access to this."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"NotFound":{"description":"The resource doesn't exist or isn't yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Not Found","status":"error","code":404,"error":{"message":"Job not found."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"TooManyRequests":{"description":"Too many generations in progress at once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Too Many Requests","status":"error","code":429,"error":{"message":"You already have 10 generations in progress. Start a new one when one finishes."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"InternalServerError":{"description":"Something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Internal Server Error","status":"error","code":500,"error":{"message":"Something went wrong on our side. Please try again."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}},"ServiceUnavailable":{"description":"Meesho pricing is offline right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"name":"Service Unavailable","status":"error","code":503,"error":{"message":"Meesho category search is offline right now. Try again in a minute."},"meta":{"version":1,"timestamp":"2026-10-21T18:23:04.460Z"}}}}}}}}