Skip to content

Recraft - Remove Background ​

Endpoint ​

POST /images/generations

Full URL: https://modelfold.ai/v1/images/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the generation task

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be recraft/remove-background for this endpoint Default:"recraft/remove-background"。 Allowed values:recraft/remove-background。 Example:recraft/remove-background。
imagestringYesImage to remove background from. Supported formats: PNG, JPG, WEBP. Max 5MB, max 16MP, max dimension 4096px, min dimension 256px. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 5.0MB) Example:https://file.aiquickdraw.com/custom-page/akr/section-images/1757057285447k9qcbki1.webp。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. maxLength: 2000.

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "recraft/remove-background",
  "image": "https://file.aiquickdraw.com/custom-page/akr/section-images/1757057285447k9qcbki1.webp",
  "prompt": "A paper boat drifting down a rainy street."
}'
json
{
  "model": "recraft/remove-background",
  "image": "https://file.aiquickdraw.com/custom-page/akr/section-images/1757057285447k9qcbki1.webp",
  "prompt": "A paper boat drifting down a rainy street."
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.