Generate
Tools
Templates
Learn
Use cases
Pricing
Sign in Start creating

img.now API

Yes, img.now has a working HTTP API you can call directly. It exposes the same endpoints the web app uses: POST /api/generate to start an AI image generation, GET /api/job/<id> to poll that job until a result URL is ready, POST /api/convert to change a file's format, and POST /api/remove-background to cut out the subject. Generation is asynchronous, you submit a prompt, get back a job id, then poll for the finished image, while convert and remove-background return a result URL in a single synchronous call. Every endpoint lives under the /api prefix and returns JSON shaped like {"ok": true, ...} on success or {"ok": false, "error": {"code": "...", "message": "..."}} on failure. Generated images are CC0 (commercial use, no attribution required); on the free plan results carry a small img.now watermark and the underlying files are pruned after 24 hours, so download anything you want to keep.

Authentication

The API is session-based today: there are no public API keys yet (they are on the roadmap). To call it, you authenticate the same way the website does, by signing in and sending the session cookie img.now sets after login. The practical pattern with curl is to log in once, save the cookie jar, and reuse it on every request. Generation works for anonymous visitors for a single free watermarked image, but the editing tools (convert, remove-background, and the rest) require a signed-in account. When you are not authenticated, protected endpoints return HTTP 401 with error code "login_required". Send and receive cookies with curl's -c (write) and -b (read) flags as shown in the examples below.

Credits

Calls are billed in credits, debited from the signed-in account. A standard image from POST /api/generate costs 20 credits; choosing a higher quality multiplies that (High = 30, Ultra = 50). Conversions and background removal cost 10 credits each; upscales cost 10/15/20 credits for 2x/4x/8x; AI edits (image-to-image, magic edit, restyle) cost 30 credits. Free accounts start with 100 credits per month plus 40 bonus credits on each day you return; the Pro plan ($14.99/mo or $149.99/yr) includes 5,000 credits with a 7-day free trial, and Max ($29.99/mo or $289.99/yr) includes 12,000. If a request would exceed your balance it returns HTTP 402 with error code "out_of_credits" and is not charged. Credits are only debited when a job actually succeeds. Billing is handled via Stripe; Pro and Max also remove the watermark and keep your files while the plan is active.

Endpoints

POST /api/generate

Start an AI image generation. JSON body: prompt (required, min 3 chars), and optional style, aspect_ratio (e.g. "1:1", "16:9"), quality ("standard", "high", or "ultra"). Generation is asynchronous: this returns immediately with a job id and a queue position. Poll GET /api/job/<id> until status is "succeeded" to get the result URL. A standard image costs 20 credits (High 30, Ultra 50). Works for one free anonymous image; after that, sign in.

Request

curl -X POST https://img.now/api/generate \
  -b cookies.txt \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a calm minimalist mountain landscape at sunrise", "style": "photographic", "aspect_ratio": "16:9", "quality": "standard"}'

Response

{
  "ok": true,
  "message": "Generation queued.",
  "job_id": "a1b2c3d4e5f6",
  "status": "queued",
  "queue_position": 2,
  "watermarked": true,
  "plan": "free",
  "prompt": "a calm minimalist mountain landscape at sunrise",
  "retention": "24 hours",
  "anon": false
}

GET /api/job/<id>

Poll the status of a generation job by its job id. While the job is waiting it returns status "queued" with a queue_position; while it runs it returns "submitted"/"finalizing"; when done it returns status "succeeded" with the result image URL(s) in images and shareable links in share_urls. A failed job returns status "failed" with an error. Poll roughly every 2 seconds. No credit cost to poll. A signed-in job is private to its owner; an anonymous job is reachable only via its unguessable token.

Request

curl https://img.now/api/job/a1b2c3d4e5f6 -b cookies.txt

Response

{
  "ok": true,
  "job_id": "a1b2c3d4e5f6",
  "status": "succeeded",
  "watermarked": true,
  "count": 1,
  "images": ["/a1b2c3d4e5f6?raw=1"],
  "image_url": "/a1b2c3d4e5f6?raw=1",
  "share_urls": ["https://img.now/a1b2c3d4e5f6"],
  "share_url": "https://img.now/a1b2c3d4e5f6",
  "plan": "free",
  "credits": 80,
  "retention": "24 hours"
}

POST /api/convert

Convert an image or document to another format. Send multipart/form-data with image (the file) and option (the target format, e.g. PNG, JPG, WEBP, GIF, BMP, TIFF, HEIC, AVIF, SVG, PDF). Supported inputs include those formats plus camera RAW; office docs and PDFs are rendered first, then encoded to the target. Synchronous: returns the result image URL directly. Costs 10 credits. Requires a signed-in session.

Request

curl -X POST https://img.now/api/convert \
  -b cookies.txt \
  -F "[email protected]" \
  -F "option=PNG"

Response

{
  "ok": true,
  "status": "succeeded",
  "message": "Converted file complete.",
  "image_url": "/9f8e7d6c5b4a?raw=1",
  "share_url": "https://img.now/9f8e7d6c5b4a",
  "credits": 70,
  "credit_cost": 10,
  "bytes_in": 2348112,
  "bytes_out": 1985004,
  "width_out": 4032,
  "height_out": 3024,
  "low_credits": false
}

POST /api/remove-background

Remove the background from an image, leaving a transparent cut-out of the subject. Send multipart/form-data with image (the file). Synchronous: returns the result image URL directly (typically a transparent PNG). Costs 10 credits. Requires a signed-in session.

Request

curl -X POST https://img.now/api/remove-background \
  -b cookies.txt \
  -F "[email protected]"

Response

{
  "ok": true,
  "status": "succeeded",
  "message": "Background removed complete.",
  "image_url": "/3c2b1a0f9e8d?raw=1",
  "share_url": "https://img.now/3c2b1a0f9e8d",
  "credits": 60,
  "credit_cost": 10,
  "bytes_in": 845210,
  "bytes_out": 512388,
  "width_out": 1024,
  "height_out": 1024,
  "low_credits": false
}

Frequently asked questions

Does img.now have public API keys?
Not yet. Authentication is session-based today: you sign in and send the session cookie img.now sets after login (with curl, save it via -c cookies.txt at login and reuse it with -b cookies.txt). Public API keys are on the roadmap, but we would rather be honest about the current state than promise a feature that is not live.
Why does /api/generate not return the image right away?
Generation is asynchronous. POST /api/generate returns a job id and a queue position immediately, then you poll GET /api/job/<id> (about every 2 seconds) until its status becomes "succeeded", at which point the response includes the result image URL in images and share_urls. This keeps the connection from hanging while the model renders, and it lets paid plans jump the queue.
How many credits does an API call cost?
A standard generated image costs 20 credits, with High at 30 and Ultra at 50. Convert and remove-background cost 10 credits each. Credits are debited only when a job succeeds, and a request that would exceed your balance returns HTTP 402 ("out_of_credits") without charging you. Free accounts get 100 credits per month plus 40 bonus credits each day they return; Pro includes 5,000 and Max includes 12,000.
Can I use API-generated images commercially?
Yes. Every image img.now produces is released under CC0, so you can use it commercially with no attribution required. One caveat: on the free plan results carry a small watermark and the stored files are pruned after 24 hours, so download what you need promptly. Pro and Max remove the watermark and keep your files while the plan is active.