Skip to content

API docs

Everything you need to call the render API: authentication, the render endpoint, jobs, usage, credits and errors.

In one sentence

The reference for the AIIPWorld render API, covering authentication, the render endpoint, job polling, usage, credits and error codes.

Key facts

  • Base endpoint: https://api.aiipworld.com/v1/render; authenticate with Authorization: Bearer sk_... or an x-api-key header. A key is shown once and must stay server-side.
  • Endpoints: POST /v1/render, GET /v1/jobs/:id and GET /v1/usage.
  • Errors: 400 invalid parameters, 401 invalid key, 402 insufficient_credits, 429 rate limited (see Retry-After), 501 reserved feature (templates, webp).
  • Results are deleted at expires_at: 1 day on the free plan, 7 days on Starter and Pro, 30 days on Business and Scale.

Machine-readable description of these endpoints: openapi.json (OpenAPI 3.1; import it into Postman or Insomnia, or generate a client from it). Is the API up right now? See status. What changed and when: changelog.

Authentication

Create a key in the dashboard and send it as Authorization: Bearer sk_... (or x-api-key). The key is shown once; keep it server-side, never in browser code.

POST /v1/render

Send exactly one of html or url. output is pdf (default), png, jpeg or html. With html you must send url: the result is the page's HTML after its JavaScript has run, as a text file of up to 2 MB. options is passed to the rendering engine (page size, margins, landscape, background printing, header and footer templates, wait conditions and more). Unknown option names are rejected. Optional timeout_sec.

curl -X POST https://api.aiipworld.com/v1/render \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello</h1><p>Rendered by headless Chromium.</p>","output":"pdf","options":{"format":"A4","print_background":true}}'

# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"

The PHP, Go and Ruby examples use only the language's standard library. We ran all three against our own gateway on 2026-10-18 (PHP 8.5, Go 1.25, Ruby 4.0): each submitted this request, polled the job and received a PDF.

The response is 202 { job_id, status: "queued", credits_reserved }.

POST /v1/image-jobs

Takes an image upload and traces it into an SVG made of vector paths (the default), converts it to PNG, JPEG, WebP, GIF or ICO, makes it smaller, or compresses it. Send the image itself as the request body, not JSON, and set Content-Type to image/png, image/jpeg, image/webp, image/avif, image/gif, image/bmp or image/tiff. The file is identified by its content, not by its name or header. AVIF is read as input only; the API never writes AVIF. On the API an image can be up to 10 MB and 16 MP (4096 x 4096). SVG, PDF, HEIC, BigTIFF and camera RAW files are not supported (Canon CR2 and DNG files are rejected outright). Unsupported files are rejected with 400 unsupported_image; a larger file gets 413 file_too_large. An animated GIF, WebP or AVIF, or a TIFF with several pages, is traced from its first frame or page. An image of more than 4 MP (for example 2000 x 2000) is scaled down to that size before tracing; the SVG is still vector.

op=image_to_svg is the default. op=image_convert converts the format and op=image_resize makes the picture smaller and op=image_compress makes the file smaller at the same pixel size; all three are described after the tracing settings. Settings go in the query string. Unknown names are rejected.

curl -X POST "https://api.aiipworld.com/v1/image-jobs?colormode=color&filter_speckle=4" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @logo.png

# returns {"job_id": "...", "status": "queued", "credits_reserved": 5}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
ParameterValuesWhat it does
colormodecolor (default) or binaryFull colour, or one black layer for line art, signatures and scans.
hierarchicalstacked (default) or cutoutColour shapes stacked on top of each other (smaller file), or cut out so none overlap. Colour mode only.
modespline (default) or polygonSmooth curves, or straight edges (smaller file).
filter_speckle0 to 16, default 4Drop patches smaller than this many pixels.
color_precision1 to 8, default 6Significant bits per colour channel. Lower means fewer colours.
layer_difference0 to 255, default 16Smallest colour difference between layers. Higher means fewer layers.
corner_threshold0 to 180, default 60Smallest turn, in degrees, that counts as a corner. Higher means rounder shapes.
segment_length3.5 to 10, default 4Curve fitting: subdivide until segments are shorter than this.
splice_threshold0 to 180, default 45Curve fitting: smallest angle change, in degrees, at which a curve is spliced.
path_precision0 to 4, default 2Decimal places in the path coordinates. Lower means a smaller file.
timeout_sec1 to 60, default 30Hard time limit for the job.

The response is 202 { job_id, status: "queued", credits_reserved }. A job costs 5 credits, plus 1 credit for each 5 MB of SVG after the first 5 MB. Poll GET /v1/jobs/:id. On success result has bytes, width, height, paths (the number of vector paths), and src_width, src_height and downscaled when the image was scaled down. download_url serves the SVG as an attachment. The uploaded file is deleted when the job ends, whether it succeeded or not.

A job fails with invalid_input (a corrupt file, an image over the pixel limit, an unsupported format), output_limit (the SVG would be over 20 MB; raise filter_speckle or lower color_precision), memory_limit or timeout, and the credits are returned. Photos are the slow case: with default settings a photo becomes many thousands of paths and a large file. Use color_precision=5, filter_speckle=16 and layer_difference=32 for a smaller result.

Converting the format: op=image_convert

Re-encodes a PNG, JPG, WebP, AVIF, GIF, BMP or TIFF image as PNG, JPEG, WebP, GIF or ICO. The pixel size stays the same (ICO sizes are the ones you choose). The image is never resized (use op=image_resize for that). Camera and location tags are not copied into the result, and an EXIF rotation is applied. An animated GIF or WebP keeps all its frames, with the same timing and loop count, when the output is GIF or WebP (animate=true, the default); with PNG, JPEG or ICO output, or animate=false, only the first frame is converted. An animated AVIF is converted from its first frame, and a TIFF with several pages from its first page (result.pages is the total). GIF output has at most 256 colours and on/off transparency. Animations are limited by frame count and by total pixels (frame width x height x frames): 300 frames and 64 MP for a signed-in key, 100 frames and 16 MP in the anonymous web tool. A larger animation fails with animation_too_large before it is decoded (use animate=false to take only the first frame). Send timeout_sec=60 for animations. A HEIC or HEIF photo (Content-Type image/heic) is also accepted here and only here, not by the other image operations: only the main picture is converted, the rotation stored in the file is applied, and a file with more than 8 pictures or a moving HEIC is refused. The upload limits are the same as for tracing.

curl -X POST "https://api.aiipworld.com/v1/image-jobs?op=image_convert&format=webp&quality=80" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @logo.png

# returns {"job_id": "...", "status": "queued", "credits_reserved": 1}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
ParameterValuesWhat it does
opimage_convertSelects format conversion instead of tracing.
formatpng, jpeg, webp, gif or ico (required)The format of the result. gif has at most 256 colours and on/off transparency; an animated GIF or WebP stays animated as gif or webp. ico packs several square sizes into one .ico file.
quality1 to 100, default 80For JPEG and lossy WebP. Ignored for PNG, GIF, ICO and for lossless WebP.
losslesstrue or false, default falseWebP only: keep every pixel exactly. The file is larger than a lossy WebP.
keep_transparencytrue (default) or falseKeep the alpha channel in PNG and WebP. JPEG has no alpha channel, so transparent areas are always filled.
background#rrggbb, default #ffffffThe colour that fills transparent areas when the result is flattened (URL-encode the # as %23).
ico_sizes16, 32, 48, 64, 128, 256 as a comma list, default 16,32,48ico only: the square sizes stored in the file. A size larger than the picture enlarges it; result.upscaled_sizes lists them.
ico_fitcontain (default) or coverico only: contain fits the picture inside the square and leaves the rest transparent (or the background colour); cover fills the square and crops the overflow from the centre.
animatetrue (default) or falseAn animated GIF or WebP converted to gif or webp keeps every frame, its timing and its loop count. false (or a png, jpeg or ico result) uses only the first frame. An animation over the frame or pixel limit fails with animation_too_large; animate=false avoids that.
timeout_sec1 to 60, default 30Hard time limit for the job. Send 60 for animations.

A conversion costs 1 credit, plus 1 credit for each 5 MB of result after the first 5 MB. An animation adds 1 credit for each started 10 MP of decoded frames beyond the first 10 MP, so a 30-frame 400 x 400 GIF costs 1 credit and the largest animation a signed-in key can send costs 7. On success result has bytes, width, height, input_format, output_format, has_alpha, output_has_alpha, flattened (true when transparent areas were filled with the background colour), animated and pages (frames or TIFF pages in the input), and for animations animated_input, frames_used, frames (frames in the result), animated_output, animation_duration_ms, loop (0 = forever) and animation_mpx (decoded megapixels, which sets the credits). For ICO, ico_sizes and upscaled_sizes list the stored sizes and the ones that were enlarged. download_url serves the file as an attachment. The job fails with invalid_input (a corrupt or unsupported file, a missing or unknown format, an image over the pixel limit), output_limit (the result would be over 20 MB, which a large photo saved as PNG can reach; use JPEG or WebP, or lower quality) or timeout, and the credits are returned.

Making a picture smaller: op=image_resize

Makes a PNG, JPG, WebP, AVIF, GIF, BMP or TIFF image smaller in pixels and re-encodes it in the same job. It never enlarges: a picture already below the size you ask for keeps its size and is only saved again in the format you chose. Give exactly one way to set the size: scale (a percent), max_side (the longest side) or width and/or height. Camera and location tags are not copied into the result, and an EXIF rotation is applied before the sizes are measured. An animated GIF or WebP is resized frame by frame and stays animated when the output is GIF or WebP (format=same keeps a GIF as a GIF); with PNG or JPEG output, or animate=false, only the first frame is used. An animated AVIF is resized from its first frame. The animation limits and the credits are the same as for op=image_convert. The upload limits are the same as for tracing.

curl -X POST "https://api.aiipworld.com/v1/image-jobs?op=image_resize&max_side=1200&format=webp" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg

# returns {"job_id": "...", "status": "queued", "credits_reserved": 1}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
ParameterValuesWhat it does
opimage_resizeSelects resizing instead of tracing.
scale1 to 100Percent of the original size. Give exactly one of scale, max_side, or width and/or height.
max_side1 to 16384The longest side, in pixels. The other side follows the aspect ratio.
width, height1 to 16384A target box. With fit=inside, giving only one of them scales to that side.
fitinside (default), cover or containinside: fit within the box. cover: fill the box and crop the overflow from the centre. contain: fit within the box on a canvas of exactly width by height. cover and contain need both width and height.
formatsame (default), png, jpeg, webp or gifsame keeps PNG, JPEG, WebP and GIF; BMP and TIFF become PNG, AVIF becomes WebP.
quality1 to 100, default 80For JPEG and WebP.
keep_transparencytrue (default) or falseKeep the alpha channel in PNG, WebP and GIF. JPEG has no alpha channel, so transparent areas are always filled.
background#rrggbb, default #ffffffThe colour that fills transparent areas when the result is flattened (URL-encode the # as %23).
animatetrue (default) or falseAn animated GIF or WebP resized to gif or webp keeps every frame, its timing and its loop count. false (or a png or jpeg result) uses only the first frame.
timeout_sec1 to 60, default 30Hard time limit for the job. Send 60 for animations.

A resize costs 1 credit, plus 1 credit for each 5 MB of result after the first 5 MB. That is the same as a conversion, so making a picture smaller and changing its format in one request is one charge. On success result has bytes, width, height, src_width, src_height, resized (false when the picture was already below the size you asked for), input_format, output_format, has_alpha, output_has_alpha, flattened, animated and, for animations, the same fields as a conversion. download_url serves the file as an attachment. The job fails with invalid_input (a corrupt or unsupported file, a missing or conflicting size, an image over the pixel limit), output_limit (the result would be over 20 MB) or timeout, and the credits are returned.

Making the file smaller: op=image_compress

Re-encodes a PNG, JPG, WebP, AVIF, GIF, BMP or TIFF image so the file is smaller, at the same pixel size. JPEG is compressed with mozjpeg and WebP is lossy. PNG is compressed by reducing the picture to at most 256 colours, which is lossy: it suits icons, illustrations and screenshots, not photographs or smooth gradients (set lossless=true to skip the colour reduction). Give quality or target_kb, not both. With a target size the engine tries up to 7 qualities, and for PNG up to 7 smaller palettes after that; it returns the smallest result it found and sets target_reached to false when it cannot get to the target. A GIF stays a GIF with format=same, and an animated GIF or WebP keeps all its frames (animate=false takes only the first). GIF output is re-encoded with colours (256, 16, 4 or 2), dither (0 to 1) and lossy (0 to 32: how much change between frames is ignored; it is lossy, and large values leave faint trails). Or give target_kb: the engine picks colours and lossy itself in at most 4 encodes and sets target_reached to false when it cannot get there. quality does not apply to GIF. The animation limits are the same as for op=image_convert. Camera and location tags are not copied into the result. The upload limits are the same as for tracing.

curl -X POST "https://api.aiipworld.com/v1/image-jobs?op=image_compress&format=jpeg&target_kb=300" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg

# returns {"job_id": "...", "status": "queued", "credits_reserved": 1}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
ParameterValuesWhat it does
opimage_compressSelects compression.
formatsame (default), png, jpeg, webp or gifsame keeps PNG, JPEG, WebP and GIF; BMP and TIFF become PNG, AVIF becomes WebP. The pixel size never changes.
quality1 to 100, default 75How hard to compress. For PNG it sets the colour reduction (at most 256 colours). Give quality or target_kb, not both. Not accepted for GIF output: use colours, dither and lossy.
target_kb1 to 20480Aim for a file of at most this many KB (1 KB = 1024 bytes). The engine tries up to 7 qualities, and for PNG up to 7 smaller palettes after that. If it cannot get there it returns the smallest result and result.target_reached is false.
losslesstrue or false, default falsePNG: no colour reduction, only stronger deflate. WebP: lossless. Ignored for JPEG. Cannot be combined with quality or target_kb.
keep_transparencytrue (default) or falseKeep the alpha channel in PNG and WebP. JPEG has no alpha channel, so transparent areas are always filled.
background#rrggbb, default #ffffffThe colour that fills transparent areas when the result is flattened (URL-encode the # as %23).
animatetrue (default) or falseAn animated GIF or WebP compressed to gif or webp keeps every frame, its timing and its loop count. false (or a png or jpeg result) uses only the first frame.
colours256 (default), 16, 4 or 2GIF output only: the palette size. Only these four sizes exist, because the encoder works with 8, 4, 2 or 1 bit palettes.
dither0 to 1, default 1GIF output only: how much the colour steps are spread out. 0 is none.
lossy0 to 32, default 20GIF output only: how much change between two frames is ignored (pixels that barely change are reused from the frame before). Higher is smaller and can leave faint trails; 0 keeps every change. Lossy.
timeout_sec1 to 60, default 30Hard time limit for the job. Send 60 for animations.

A compression costs 1 credit, plus 1 credit for each 5 MB of result after the first 5 MB, the same as a conversion. On success result has the conversion fields plus original_bytes, bytes, saved_bytes, saved_percent, larger_than_input (true when the result is not smaller than the original; the file is still returned, so check it), quality_used, colours_used (PNG), target_kb, target_reached, iterations and stopped_early (the search stopped to stay inside the time limit), plus the animation fields of a conversion. The job fails with invalid_input, output_limit or timeout, and the credits are returned.

Reading text: op=image_to_text

Reads the text of a PNG, JPEG, WebP, TIFF (first page only) or PDF with the open-source OCR engine Tesseract. Send the file as the request body, not JSON, and set Content-Type to image/png, image/jpeg, image/webp, image/tiff or application/pdf; the type is checked from the file content. GIF, BMP, AVIF, HEIC and SVG are refused. A PDF is turned into pictures and read as pictures, up to max_pages pages, so its text layer is not used. Settings go in the query string. Unknown names are rejected.

The response is 202 with a job_id, then poll GET /v1/jobs/:id. download_url is a short-lived link to the text file (a text, TSV or hOCR file; several pages are separated by a line holding only a form feed). The result has words, chars, mean_confidence (0 to 100: how sure the engine was of each letter, which says nothing about missing lines or wrong order), pages_processed, pages_total, truncated_pages, empty and retried. Files can be up to 10 MB and 16 MP (4096 x 4096) per picture, and a PDF up to 5 pages. Reading costs 1 credit for each page read (a picture is one page). A job that finds no text succeeds with empty set to true and is not charged. Failed jobs are refunded.

The engine reads clear screenshots, scans and printed text well. It does not read handwriting, it keeps no table structure (rows come out as a stream of text and can be lost or reordered), phone photos with perspective and background read poorly with psm 3 (try psm 6), and there is no searchable-PDF output. Errors: invalid_input with error_code unsupported_image, unsupported_pdf, image_too_large or file_too_large; 413 file_too_large; 402 insufficient_credits; 429.

curl -X POST "https://api.aiipworld.com/v1/image-jobs?op=image_to_text&lang=eng&psm=3&format=txt" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @scan.png

# returns {"job_id": "...", "status": "queued", "credits_reserved": 1}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
ParameterValuesWhat it does
opimage_to_textSelects reading text instead of tracing.
langeng (default), spa or jpn; join up to three with +The language of the text. Only English, Spanish and Japanese (horizontal text) are installed. Other languages come out as wrong letters.
psm3 (default), 4, 6, 7 or 11Page layout. 3: automatic, for documents, screenshots and columns. 6: one block of text, for receipts and photographed pages. 7: one line. 11: scattered text. 4: one column of varying sizes.
formattxt (default), tsv or hocrtxt is UTF-8 text. tsv has each word with its position and confidence. hocr is position markup, delivered as plain text.
dpi70 to 600The resolution of the picture, if you know it. PDF pages are drawn at 300 dpi by default.
max_pages1 to 5, default 1PDF only: how many pages to read, from the first page. Anonymous web use is limited to 2.
deskewtrue or false, default falseStraighten text tilted by up to 15 degrees before reading. When the first read finds no text at all, the engine tries once more with this on.
auto_rotatetrue or false, default falseDetect the page orientation and turn the picture upright by 90, 180 or 270 degrees first.
invertauto (default), off or onLight text on a dark background is inverted automatically; off or on forces the choice.
upscaleauto (default), off, 2 or 3auto enlarges a small, low-confidence picture 2 times and keeps the better result.
timeout_sec1 to 60, default 30Hard time limit for the job.

POST /v1/uploads and POST /v1/pdf-jobs

Merging, splitting, extracting and rotating PDFs takes two steps. First POST each PDF to /v1/uploads as raw bytes with Content-Type application/pdf, one file per request; the answer is 201 with an upload_id. An upload belongs to the key that made it, can be used once and expires after 1 hour if unused. Then POST /v1/pdf-jobs with JSON {op, params, files} and poll GET /v1/jobs/:id as for any job. download_url points to a PDF, or to a ZIP for pdf_split.

The pages are copied or turned as they are, with no re-encoding (qpdf, Apache-2.0). Page ranges are numbers, N-M, z (the last page) and rK (K-th from the end), comma separated, at most 200 items. Encrypted PDFs (password or permission restrictions) are refused by every operation except pdf_unlock, and those operations accept no password. The result has pages_in, pages_out, files_in or files_out, repaired and warnings.

Limits: up to 50 MB per file, 20 files and 100 MB in all for a merge, and up to 500 pages. Each job costs 1 credit, plus 1 credit for each started 20 MB of result beyond the first 20 MB; failed jobs are refunded. A job fails with invalid_input and error_code encrypted_pdf, corrupt_pdf, repaired_not_allowed, not_a_pdf, too_many_pages, too_many_objects, page_out_of_range or bad_params. The gateway answers 404 upload_not_found, 413 file_too_large or total_too_large, 422 not_a_pdf, too_few_files, too_many_files or duplicate_upload, 402 insufficient_credits, and 429.

GET /v1/jobs/:id/download streams the finished file through the API (with Content-Disposition attachment and X-Content-Type-Options nosniff) when you need those headers; it takes the same key.

Delete pages, PDF to image and image to PDF use the same two steps: upload with the Content-Type of the file (application/pdf; image/jpeg or image/png for image_to_pdf), then start the job.

PDF to image: a PDF can have up to 100 pages per job (the free web tool 10); more pages are refused with too_many_pages, never silently dropped. Fonts that are not embedded in the PDF are replaced, and Chinese, Japanese or Korean text without embedded fonts can look wrong. The result has pages_in, pages_out, files_out, format, dpi, dpi_reduced_pages, width and height of the first page and total_mpx; a job costs 1 credit, plus 1 for each started 10 pages beyond the first 10, plus 1 for each started 20 MB of result beyond the first 20 MB. Image to PDF accepts JPG, PNG and TIFF (WebP and others are refused with 422 unsupported_image; convert them to JPG first), up to 100 images per job (the free web tool 20), JPG up to 50 megapixels and PNG up to 16 megapixels each; a job costs 1 credit, plus 1 for each started 20 images beyond the first 20, plus 1 for each started 20 MB of result beyond the first 20 MB. Deleting pages costs the same as extracting. Further error codes: no_pages_left, page_too_large, too_many_pixels, unsupported_image, image_too_large.

Text, reorder, page numbers, watermark and protect take exactly one PDF, uploaded as above, and cost 1 credit, plus 1 credit for each started 20 MB of the result for the four that return a PDF. Extracting text from a PDF with no text layer succeeds with result.empty set to true and costs nothing; use image_to_text (OCR) for scans. The text file is UTF-8 and the layout option only lines text up as well as it can.

Page numbers and watermarks are drawn in Helvetica, so they support digits and Latin letters only (no Chinese, Japanese, Korean, Cyrillic or emoji), and the watermark is drawn above the page content. pdf_reorder must list every page exactly once: to drop pages use pdf_delete, to repeat pages use pdf_extract first.

pdf_protect sends the passwords in the JSON body over HTTPS. The gateway seals them with AES-256-GCM before the job is queued: they are never written to the database, the usage records, the job view or the logs, and the worker deletes them when the job ends. We cannot recover a lost password. Permission limits (print, copy, edit) are only a request that PDF programs may ignore. The operation is not available (503) while the server has no sealing key configured.

Crop PDF takes exactly one PDF, uploaded as above, and costs 1 credit, plus 1 credit for each started 20 MB of the result. Give margins (top, right, bottom, left: how much to cut off each side of the page as it is shown) or rect (x and y from the top-left corner of the page, with the width and height of the part to keep), a unit (mm by default, pt, in, or percent of the width and height of each page), apply (crop, the default, sets the CropBox; media sets the MediaBox and the CropBox) and optionally pages. Cropping hides, it does not delete: the content outside the box stays in the file, so this is not redaction. If a box does not fit on one of the chosen pages, the whole job fails with crop_out_of_bounds and names the page. An absolute unit is applied to every chosen page as it is, so for a PDF with pages of different sizes use percent or choose the pages. The result has boxes (the new box of each page), cropped_pages and removes_content set to false.

Extract images takes exactly one PDF and returns a ZIP of the pictures embedded in it (files are named like page-003-img-01.jpg). With mode original, the default, a JPEG is copied unchanged and other pictures are written as PNG; JPEG 2000, JBIG2, CCITT and CMYK pictures are written as .jp2, .jb2e or .jb2g, .ccitt and .tif files, which most browsers cannot open, so use mode png to get PNG files. Converting large, detailed pictures to PNG can be slow and can run into the time limit; then use original. min_width and min_height drop small pictures such as icons, include_masks adds the transparency masks (off by default), and a picture used on several pages is saved once. Drawings and text are not pictures and cannot be extracted; a scanned page is one big picture. Limits: up to 500 pictures per job (the free web tool 100), 5,000 picture objects on the chosen pages, a ZIP of up to 100 MB (40 MB), and up to 96 MP to convert to PNG (24 MP). A job costs 1 credit, plus 1 for each started 20 MB of the ZIP; a PDF without pictures succeeds with result.empty set to true and costs nothing. Further error codes: too_many_images, too_many_pixels.

TIFF files go to image_to_pdf in the same way as JPG and PNG (Content-Type image/tiff or application/octet-stream), and can be mixed with them. Every page of a TIFF becomes one page of the PDF (result.tiff_pages); thumbnail and mask sub-images are skipped. Transparency is put on a white background, 16-bit pictures are used as 8-bit, ICC profiles are not applied and BigTIFF is refused. A TIFF page is stored without loss, so a TIFF that was compressed as JPEG can give a PDF several times larger. With page_size fit the page has the size given by the resolution stored in the file, or 96 dpi when there is none. Limits: one TIFF page up to 25 MP; all TIFF pages of one job up to 120 MP (60 MP in the free web tool), where a black-and-white page counts for 25% of its pixels; picture data in the PDF up to 100 MB (40 MB). The price is the same as for JPG and PNG, counted by the pages of the PDF. Errors: unsupported_image, image_too_large, too_many_pixels, too_many_pages.

Unlock takes exactly one password-protected PDF, uploaded as above, and the password in params. It tries only that one password: no retries, no other spelling, no dictionary, and it never guesses or recovers a password. A PDF that has no password but restricts printing, copying or editing needs its owner password. The result has no password and no limits; a digital signature can become invalid because the file is changed. RC4 (40 and 128 bit), AES-128 and AES-256 are supported; encryption with a certificate is not (unsupported_encryption). A job costs 1 credit, plus 1 credit for each started 20 MB of the result beyond the first 20 MB; a failed job is refunded.

The password is sent in the JSON body over HTTPS. The gateway seals it with AES-256-GCM before the job is queued: it is never written to the database, the usage records, the job view or the logs, and the worker deletes it when the job ends. The job fails with invalid_input and error_code wrong_password (the password does not open the file), not_encrypted (nothing to unlock; no charge), unsupported_encryption or too_many_attempts: after 10 wrong passwords for the same file (counted by a hash of the file) within 24 hours, every attempt on that file is refused, even with the right password. A lost password cannot be recovered. The operation is not available (503) while the server has no sealing key configured. Only unlock files you own or have the right to open (Acceptable Use Policy).

Flatten takes exactly one PDF and costs 1 credit, plus 1 credit for each started 20 MB of the result beyond the first 20 MB; a PDF with nothing to flatten costs nothing. what is all (form fields and annotations, the default), forms or annotations. The picture of each field and annotation is drawn into the page and the object is removed; links always stay. An annotation without a picture of its own (skipped_no_appearance) and an annotation that keeps its direction on a turned page (skipped_no_rotate) are left as they are. Hidden fields and annotations are removed (removed_hidden). Dynamic XFA forms: only the standard fields are flattened. Flattening cannot be undone and is not redaction or protection; a digital signature can become invalid. More than 20,000 fields and annotations in one PDF fails with too_many_annotations.

Resize takes exactly one PDF and costs 1 credit, plus 1 credit for each started 20 MB of the result beyond the first 20 MB. It changes the page size, not the file size, and it does not lay the content out again. The presets are A4 (595.28 x 841.89 points), A3 (841.89 x 1190.55), A5 (419.53 x 595.28), Letter (612 x 792) and Legal (612 x 1008); a custom size is used exactly as given, from 36 to 14,400 points on each side (1 inch is 72 points). A preset cannot be combined with width, height or unit, and a custom size cannot have an orientation. Pages that are turned by a rotation setting are handled as they are seen and keep their rotation. Links move with the content, but a bookmark or link that points to a spot on a page can end up a little off the spot; form fields are kept and their text size does not scale.

E-book to PDF takes exactly one e-book (EPUB, MOBI, AZW, AZW3 or FB2). Upload it to POST /v1/uploads as raw bytes with Content-Type application/octet-stream (the format is read from the file content, not from the name or the type), then POST /v1/pdf-jobs with {"op": "ebook_to_pdf", "params": {...}, "files": [upload id]}. params are optional; unknown names are refused with invalid_params. The hard time limit of a job is 120 seconds.

Limits: a file up to 50 MB with a key (20 MB in the free web tool), a book text up to 1 MB (768 KB in the web tool), one EPUB chapter file up to 640 KB, and a PDF of up to 1,200 pages on the free plan and 2,000 on a paid plan (600 in the web tool). A book over a limit fails with file_too_large, book_too_large or too_many_pages and is refunded. A job costs 2 credits for a PDF of up to 200 pages, plus 1 credit for each further started 200 pages; failed and timed-out jobs are refunded in full.

DRM: a book protected with DRM is refused, either at upload (422 drm_protected) or when the job runs (error_code drm_protected). We never remove DRM, so convert only books you have the right to convert. Other job errors are unsupported_input, corrupt_input, archive_unsafe (an EPUB with unsafe paths or a zip bomb), timeout, memory_limit and output_limit. A file that is not an e-book is refused at upload with 415 unsupported_file, or with 422 not_an_ebook if it is used in an e-book job.

Office to PDF takes exactly one document (docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp or rtf). Upload it to POST /v1/uploads as raw bytes with Content-Type application/octet-stream (the format is read from the file content, not from the name or the type), then POST /v1/pdf-jobs with {"op": "office_to_pdf", "params": {}, "files": [upload id]}. There are no params: any param is refused with invalid_params. The input is an Office file, not a PDF.

Limits: a file up to 50 MB with a key (10 MB in the free web tool), a PDF of up to 500 pages (50 in the web tool), and 60 seconds per conversion (30 in the web tool). A longer document is cut at the page limit: the conversion succeeds, result.page_limit_reached is true, and the pages after the limit are neither converted nor charged. A job costs 1 credit, plus 1 credit for each started 50 pages of the PDF beyond the first 50, plus 1 credit for each started 20 MB of the PDF beyond the first 20 MB; failed jobs are refunded. Free web use is limited to 10 conversions per day per visitor.

Password-protected files are refused, at upload (422 password_protected) or when the job runs (error_code password_protected). A file with macros is converted and the macros are not run; result.macros is true so your code can warn the user. Links in the document to other files or addresses are set never to update. Other job errors are unsupported_input (not an Office file), corrupt_input, archive_unsafe (a document that expands to an unsafe size), file_too_large, timeout, memory_limit and output_limit. The layout comes from LibreOffice with substitute fonts (Microsoft's own fonts are not installed), so it is close to, but not identical to, what Word, Excel or PowerPoint print.

curl -X POST "https://api.aiipworld.com/v1/uploads" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @part-1.pdf   # returns {"upload_id": "UPLOAD_ID_1", ...}

curl -X POST "https://api.aiipworld.com/v1/uploads" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @part-2.pdf   # returns {"upload_id": "UPLOAD_ID_2", ...}

curl -X POST "https://api.aiipworld.com/v1/pdf-jobs" \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op":"pdf_merge","params":{},"files":["UPLOAD_ID_1","UPLOAD_ID_2"]}'
# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
opfiles and paramsWhat it does
pdf_mergefiles: 2 or more upload ids, in merge orderJoins the PDFs into one PDF. Params: allow_repair, linearize.
pdf_splitfiles: 1 upload id; mode each (default), every (with every, 1 to 500) or ranges (with ranges)Makes a ZIP of PDFs: one per page, one per group of pages, or one per comma-separated range such as 1-3,4-6.
pdf_extractfiles: 1 upload id; pages (required)Keeps the pages you list, in that order, as one PDF. A page can be repeated.
pdf_rotatefiles: 1 upload id; rotation 90, 180 or 270 (required); optional pagesTurns pages clockwise by adding to their current rotation. Without pages, all pages are turned.
pdf_deletefiles: 1 upload id; pages (required)Removes the pages you list; the other pages keep their order. At least one page must stay (otherwise no_pages_left).
pdf_to_imagefiles: 1 upload id; format jpg (default) or png; dpi 72, 96, 150 (default), 200 or 300; quality 1 to 100 (jpg only, default 85); optional pagesDraws pages as pictures with poppler: one JPG or PNG for a single page, otherwise a ZIP of page-001.jpg and so on (numbers are the original page numbers). A page that would exceed 25 megapixels is drawn at a lower DPI (result.dpi_reduced_pages).
image_to_pdffiles: 1 or more upload ids of JPG, PNG or TIFF images (a TIFF with several pages makes several pages), in page order; page_size fit (default), a4 or letter; orientation auto (default), portrait or landscape (a4 and letter only); margin none (default), small, medium or largePuts one image on each page, centered and scaled to fit, in the order of files. A JPEG is stored as it is (no re-compression); a photo is turned upright by its EXIF rotation.
pdf_to_textfiles: 1 upload id; optional layout (true keeps the layout as far as possible), pages, page_markers (true puts a line --- Page N --- before each page)Copies the text layer of the PDF into a UTF-8 text file (output.txt). A PDF without a text layer (a scan) succeeds with result.empty set to true, an empty file and the credits refunded.
pdf_reorderfiles: 1 upload id; order (required, for example 3,1,2,4-z, at most 4000 characters)Puts the pages in the order you list. Every page must appear exactly once: a missing page fails with missing_pages and a repeated page with duplicate_page.
pdf_page_numbersfiles: 1 upload id; position (bottom-center default, bottom-left, bottom-right, top-center, top-left, top-right), format ({n} default, {n} / {total}, Page {n}, Page {n} of {total}), start_at (0 to 100000, default 1), font_size (6 to 48, default 10), margin (8 to 144 points, default 28), color (#rrggbb, default black), optional pagesWrites a page number on each page (or on the pages you list). Only numbered pages are counted: with pages 2-z and start_at 1 the second page shows 1. Digits and the English words Page and of only (Helvetica).
pdf_watermark_textfiles: 1 upload id; text (required, 1 to 100 Latin characters on one line), opacity (0.05 to 1, default 0.25), angle (-90 to 90 degrees, default 45), font_size (8 to 300, default 48), color (#rrggbb, default #808080), position (center default or tile), optional pagesDraws the text on top of the page content, once in the center or tiled across the page (at most 300 marks per page). Chinese, Japanese, Korean, Cyrillic, emoji and line breaks are refused with bad_params.
pdf_protectfiles: 1 upload id; owner_password (required), user_password (optional), allow_print, allow_copy, allow_modify (true by default)Encrypts the PDF with AES-256. With a user_password the file asks for it on opening; without one anyone can open it and only the permission limits apply. A PDF that is already encrypted is refused with encrypted_pdf; to remove a password you know, use pdf_unlock.
pdf_cropfiles: 1 upload id; margins {top, right, bottom, left} or rect {x, y, width, height} (exactly one); unit mm (default), pt, in or percent; apply crop (default) or media; optional pagesSets the visible area of the pages (the CropBox, with apply media also the MediaBox) and keeps the rest of the content in the file. Margins are how much to cut off each side of the page as it is shown; rect is the part to keep, with x and y measured from the top-left corner. It is not redaction: the cropped-away content is still in the file.
pdf_extract_imagesfiles: 1 upload id; mode original (default) or png; min_width and min_height in pixels (default 1); include_masks (default false); optional pagesSaves the pictures embedded in the PDF into a ZIP (output.zip). Vector drawings and text are not pictures and are not extracted. A PDF without pictures succeeds with result.empty set to true, an empty ZIP and the credits refunded.
pdf_unlockfiles: 1 upload id (a password-protected PDF); password (required, 1 to 127 bytes of UTF-8, no line breaks or control characters); optional allow_repairRemoves the password and the permission limits (printing, copying, editing) from a PDF, using only the password you give: the password that opens the file, or the owner password (a PDF that opens without a password but has limits needs its owner password). It never guesses, searches for or recovers passwords. The result has unlocked, encryption, password_type (user or owner), restrictions_removed and pages.
pdf_flattenfiles: 1 upload id; what all (default), forms or annotations; optional allow_repairDraws the form fields and annotations into the page and removes them, so they cannot be edited any more. Links are always kept. A PDF with nothing to flatten succeeds with result.empty set to true, comes back unchanged and costs nothing. The result has widgets_flattened, annotations_flattened, links_kept, skipped_no_appearance, skipped_no_rotate and removed_hidden.
pdf_resizefiles: 1 upload id; size a4 (default), a3, a5, letter, legal or custom (with width and height, and unit mm by default, in or pt); orientation auto (default), portrait or landscape (presets only); mode fit (default) or extend; optional pagesChanges the page size, not the file size, and does not lay the content out again. With fit each page is scaled to the new size and centered (pages can be enlarged); with extend the content keeps its size and is centered (white margins, or cut off). Each side of a custom size is 36 to 14400 points. The result has resized_pages, unchanged_pages, sizes_pt, scale_min and scale_max.
image_combinefiles: 2 to 20 upload ids of PNG, JPG, WebP or TIFF images, in the order of the result; layout horizontal (default), vertical or grid; columns 1 to 20 (grid only, default ceil(sqrt(n))); spacing and margin 0 to 500 px (default 0); align start, center (default) or end; resize none (default), height, width or cell with size, or cell_width and cell_height, and fit contain (default) or cover; format png (default), jpeg or webp; quality 1 to 100 (default 90); background #rrggbb (default #ffffff) or transparent (png and webp only)Combines the images into one picture: a row, a column or a grid. The result is output.png, output.jpg or output.webp. An animated WebP gives its first frame; GIF, BMP, AVIF, HEIC and SVG are refused at upload.
ebook_to_pdffiles: 1 upload id of an EPUB, MOBI, AZW, AZW3 or FB2 e-book; page_size letter (default), a4, a5, a6, b5, legal, 6x9, 5x8 or 5.5x8.5; margin_mm 5 to 40 (default 18); font_size_pt 8 to 24 (default 12); font_family serif (default), sans or mono; page_numbers (default true); include_cover (default true); toc (default false); cjk_variant auto (default), zh-hans, zh-hant, ja or koConverts the e-book to a PDF with the fonts embedded. DRM-protected books are refused with drm_protected: there is no operation that removes DRM. The result has pages, bytes, src_format, page_size, margin_mm, font_size_pt and font_family.
office_to_pdffiles: 1 upload id of a Word, Excel, PowerPoint, OpenDocument or RTF file (docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp or rtf); no paramsConverts the document to a PDF with LibreOffice. Hidden slides and hidden sheets are left out, speaker notes are not printed, and fonts that are not installed are replaced, so the layout can differ from Microsoft Office. The result has pages, src_format, page_limit, page_limit_reached, macros (true when the file contains macros, which are never run) and external_links.
Param (all ops)ValuesWhat it does
allow_repairtrue (default) or falseA slightly damaged PDF is repaired automatically and result.repaired is true. With false, a damaged PDF is refused.
linearizetrue or false, default falseWrite the result for fast web viewing.
timeout_sec1 to 60, default 60Hard time limit for the job (30 for anonymous use).

Inverting colors, adding text and removing backgrounds

Inverting colors: POST /v1/image-jobs?op=image_invert with the image as the body (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF). Every color channel becomes 255 minus its value; the picture is not resized. Parameters: format (same by default, png, jpeg, webp or gif; same keeps a GIF as a GIF, BMP and TIFF become PNG, AVIF becomes WebP), quality (1 to 100, default 80, JPEG and WebP), keep_transparency (default true: transparent areas stay transparent and only the colors are inverted; false fills them with background first), background (a color such as #ffffff, default white; used when transparency is dropped, and always for JPEG output), invert_alpha (default false: the transparency channel is left alone; true inverts it too) and animate (default true: an animated GIF or WebP is inverted frame by frame and keeps its timing and loop). Camera and location tags are not copied into the result and an EXIF rotation is applied. The limits and the credits are the same as for op=image_convert. The job fails with invalid_input (unsupported_image, image_too_large, animation_too_large), output_limit or timeout.

Adding text to a GIF: POST /v1/image-jobs?op=gif_edit&action=text with an animated GIF or WebP (or a single-frame one) as the body. Parameters: text (required, 1 to 200 characters, at most 4 lines, a newline starts a new line), position (top, center or bottom, default bottom, centered horizontally) or x and y together (the top-left corner of the text block in pixels), font_size (8 to 400; default 15 percent of the frame height), color (default #ffffff), stroke_color (default #000000), stroke_width (0 to 20; default about one twelfth of the font size; 0 means no outline), start_frame and end_frame (only these frames get the text; default all), format (same, gif or webp) and quality (WebP). One bold font is used (DejaVu Sans Bold, with Noto Sans CJK Bold for Chinese, Japanese and Korean). Latin, Greek, Cyrillic, Chinese, Japanese and Korean letters, digits and common symbols work; emoji, control characters and right-to-left scripts are rejected. Text is not wrapped for you, and a line that is too wide is made smaller (result.text.shrunk) or, if it still does not fit, cut off (result.text.clipped). A GIF result has at most 256 colors. The animation limits and the credits are the same as for op=gif_edit and op=image_convert.

Editing a picture: POST /v1/image-jobs?op=image_edit&action=<action> with the image as the body (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF). One request does one action, and each action accepts only its own parameters (another action's parameter is rejected with invalid_params). flip: direction (horizontal, the default, vertical or both). rotate: angle (required, -360 to 360; positive turns clockwise; 90, 180 and 270 swap or keep the sides exactly, any other angle makes the canvas big enough for the whole picture) and background (a color such as #ffffff, or transparent, the default, for the empty corners). crop: either x, y, width and height with unit px (default, whole numbers) or percent (0 to 100 of the whole picture), or aspect (such as 1:1 or 16:9) for the largest centered crop of that shape; a box that goes outside the picture fails with invalid_input and is never shrunk. grayscale: keep_alpha (default true); with threshold (0 to 255) the result is strictly black and white (pixels at or above the threshold become white), and dither (default true when threshold is given) spreads the error for a halftone look, which flickers on animations; a JPEG output adds grey noise around the edges, so choose png or gif for strict black and white. blur: mode (blur, the default, pixelate or solid), sigma (0.3 to 50, default 5, in pixels; mode blur only), block (2 to 200, default 16; mode pixelate only), color (default #000000; mode solid only) and regions (up to 10 boxes written x,y,width,height;x,y,width,height, with unit px, default, or percent of the whole picture; leave it out to cover the whole picture; a box outside the picture fails with invalid_input). A blur or a small mosaic can be partly reversed, so to hide an ID number, a card number or a license plate use mode solid, the only option that removes the content for good. The result echoes the mode, the value used and the number of regions (result.blur). border: width (1 to 200 px, required), color (a color such as #000000, the default, or transparent) and sides (all, the default, or a comma list of top, right, bottom, left). round_corners: shape (rounded, the default, or circle). With shape circle there is no radius: the largest centered square is cut out and masked into a circle with transparent corners in one request (x, y and size, all whole pixels and all three together, choose another square area instead). With shape rounded: radius (required; unit px, default, whole numbers from 1 to 8192, or percent from 0.1 to 50 of the shorter side; 50 percent makes a circle on a square picture, and a radius above half of the shorter side is reduced to that half and reported as clamped). Every action also takes format (same, the default, png, jpeg, webp or gif), quality (1 to 100, default 90, for JPEG and WebP), background (a color, default #ffffff, used when the output cannot hold transparency) and animate (default true: an animated GIF or WebP is edited frame by frame and keeps its timing and loop; PNG or JPEG output, or animate=false, uses the first frame only). A result that gets transparent pixels (a turn by another angle, a transparent border, rounded corners) is written as PNG when format is same and the input is a JPEG, and a JPEG output fills the transparent areas with the background color; GIF transparency is on or off only, so the edges look jagged. The result reports the action's numbers (result.rotate, result.crop with the real box, result.round_corners with clamped, and so on), width and height of the result, and notes. The output canvas is at most 40 megapixels (WebP: 16383 px on a side); camera and location tags (EXIF, GPS) are not written to the result and an EXIF rotation is applied first. The limits and the credits are the same as for op=image_convert; animation limits apply to the output canvas. The job fails with invalid_input (for example a crop box outside the picture), unsupported_image, image_too_large, animation_too_large, output_limit or timeout.

Splitting a picture: POST /v1/image-jobs?op=image_edit&action=split with the image as the body (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF). The result is one ZIP with one picture per tile, named r1c1, r1c2 and so on (r then the row, c then the column, counted from 1, from the top-left corner), stored without further compression. Choose the cut in one of three ways, which cannot be combined: preset (1x2, 2x1, 1x3, 3x1, 2x2, 2x3, 3x2, 3x3 or 4x4, written rows x columns, so 1x3 is one row of three tiles), rows and cols (1 to 20 each; give only one and the other is 1; the picture is divided evenly, the tiles differ by 1 pixel at most and no pixel is lost), or tile_width and tile_height (1 to 65,535 pixels; give only one and the other is the whole side; tiles start at the top-left corner; edge keep, the default, keeps the smaller tiles at the right and bottom edge, edge drop leaves them out and the result says how many pixels were left out; edge only works with tile sizes). A split makes at least 2 and at most 400 tiles; a choice over that is refused before any work is done, as is a split into more columns or rows than the picture has pixels. format is same (the default: JPEG stays JPEG, WebP and AVIF become WebP, PNG, GIF, BMP and TIFF become PNG), png, jpeg or webp (not gif), quality (1 to 100, default 90, JPEG and WebP) and background (a color, default #ffffff, for the transparent areas of JPEG tiles). An animated GIF or WebP is split at its first frame only. The ZIP can be up to 20 MB (a large photo saved as PNG tiles can pass it: choose jpeg or webp; the job then fails with output_limit and the credits are refunded). The result has split (mode, rows, cols, tiles, the tile sizes and positions, partial_tiles, dropped_right_px, dropped_bottom_px, first_frame_only) and notes. The limits and the credits are the same as for op=image_convert; an animation adds no animation credits.

Making a background transparent: POST /v1/image-jobs?op=image_edit&action=transparent with the image as the body (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF). This is a color-to-alpha filter, not an AI cut-out: it removes a flat background color and does not find a subject in a photo with a busy background. color is auto (the default: the color the four corners agree on) or a color such as #ffffff (write # as %23 in a query string). tolerance (0 to 100, whole numbers, default 10) is how far from that color a pixel may be and still be removed; 0 removes only the exact color. feather (0 to 100, whole numbers, default 50) is the width of the soft edge: pixels next to the removed area, within 1 pixel (feather 1 to 34), 2 pixels (35 to 68) or 3 pixels (69 to 100), are given the color of the nearby subject and a partial transparency, so no light fringe stays; feather 0 gives a hard edge, where each pixel is either removed or kept as it is. Pixels of the subject keep their color and transparency exactly. contiguous (true or false, default false) removes only the background that is connected to the edges of the picture, so same-colored areas inside the subject stay; with false the color is removed everywhere. format is same (the default: PNG, and WebP stays WebP), png or webp (not jpeg or gif, which cannot hold transparency), quality (1 to 100, default 90, WebP only; the transparency is stored exactly). An animated GIF or WebP uses its first frame only. If the four corners are already transparent and color is auto, the job fails with invalid_input. The result reports transparent (color, auto, tolerance, feather, contiguous, removed_pixels, soft_edge_pixels, kept_pixels, removed_percent, touches_border) and notes, for example when nothing was removed. The limits and the credits are the same as for the other image_edit actions.

Removing a background with AI: POST /v1/image-jobs?op=image_remove_bg with the image as the body (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF; a GIF uses its first frame). A neural network (BiRefNet, run on CPUs) finds the main subject and the rest becomes transparent. Parameters: quality (standard, the default, or high: a larger model that is about twice as slow and copes better with reflective, hairy or cluttered subjects), format (png, the default, or webp), background (transparent, the default, or a color such as #ffffff, written %23ffffff in a query string, which gives an opaque picture on that color) and crop (true cuts the result to the subject; default false). The result has the size of your picture, and the picture's camera and location tags are not kept. Limits: up to 20 MB and 25 MP per picture with a key (8 MB and 12 MP in the free web tool, 3 a day per visitor), a hard time limit of 60 seconds for standard and 120 seconds for high. A job costs 2 credits for standard and 4 for high, plus 1 credit for each further started 5 MB of the result beyond the first 5 MB; a job that finds no subject succeeds with result.empty set to true and costs nothing, and a failed job is refunded. The processing runs on CPUs, so expect several seconds to about a minute; the response is 202 with a job_id, then poll GET /v1/jobs/:id. Errors: invalid_params (an unknown or wrong parameter), unsupported_image, file_too_large, and job errors with error_code image_too_large, corrupt_input, timeout or memory_limit. It does not remove watermarks, does not retouch faces, and hair, fur, glass and thin structures can stay rough.

Reversing a GIF: POST /v1/image-jobs?op=gif_edit&action=reverse with an animated GIF or WebP as the body. The frames are put in the opposite order; each frame keeps its own delay and the loop count stays. boomerang (true or false, default false) plays forward and then backward without repeating the first and last frame, so n frames become 2n - 2 frames (a 2-frame animation stays at 2 frames). format (same, gif or webp) and quality (1 to 100, default 80, WebP) work as for the other GIF actions; a GIF result has at most 256 colors. The animation must have more than one frame (otherwise invalid_input), and a PNG or JPEG is refused with unsupported_image. The input is checked against the animation limits (up to 100 frames and 16 MP without an account, 300 frames and 64 MP signed in) from the file header, and for a boomerang the output (2n - 2 frames and their pixels) is checked again before anything is encoded: over a limit the job fails with animation_too_large. The result has frames, animation_duration_ms, animation_mpx (counted on the output frames, so a boomerang can cost more) and reverse (boomerang, source_frames, output_frames, frame_order, delays_ms, total_duration_ms, loop). Send timeout_sec=60 for animations.

Combining pictures: upload each image to POST /v1/uploads (raw bytes, Content-Type image/png, image/jpeg, image/webp or image/tiff, one image per request), then POST /v1/pdf-jobs with {"op": "image_combine", "params": {...}, "files": [upload ids in order]}. The endpoint is the one image to PDF uses. Between 2 and 20 images; each up to 10 MB and 16 MP (4096 x 4096); all together up to 60 MB and 64 MP; the result up to 40 MP and 20 MB (otherwise the job fails with output_limit and is refunded). The result has width, height, output_format and a combine object with the position of every image. A job costs 1 credit, plus 1 credit for each started 5 MB of the result beyond the first 5 MB. Pictures that are not resized are copied pixel for pixel; a picture with semi-transparent areas is blended onto a solid background.

POST /v1/jobs (charts)

Charts are a JSON job: POST /v1/jobs with {"op": "chart_render", "params": <chart>} and your API key, then poll GET /v1/jobs/:id. The chart pages on this site draw the same chart in your browser from the same settings (the web tools and the API share the chart code), and each page shows its request below the tool.

params.type is bar, histogram, box, scatter, dot, stem_leaf or radar, and params.data holds the numbers (see the table). format is png (default), svg or pdf; width 200 to 4000 px (default 1200), height 150 to 4000 px (default 800); pixel_ratio 1 or 2 for PNG, at most 16,000,000 PNG pixels. Optional: title and subtitle (up to 200 characters), x_label and y_label (up to 100), colors (up to 10 hex colours like #4f46e5), background (#rrggbb or transparent), legend, show_values (bar, histogram), font_size 8 to 32.

Limits: up to 10 series, 200 bar categories, 10,000 histogram or box plot numbers, 5,000 scatter points, 1,000 dot plot or stem-and-leaf numbers, 3 to 20 radar axes, 20,000 numbers in one chart. Unknown keys and values outside the limits are refused with 400 invalid_params before any credit is used. Text is drawn as text: it is never run as code.

A chart costs 1 credit, plus 1 credit for each 5 MB of file after the first 5 MB. On success result.stats has the numbers the chart was drawn from: histogram bins and counts, box plot quartiles (linear interpolation, like Excel QUARTILE.INC), whiskers and outliers, the scatter line of best fit (slope, intercept, R squared), dot counts, stem-and-leaf rows and key, radar scale.

curl -X POST https://api.aiipworld.com/v1/jobs \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op":"chart_render","params":{"type":"histogram","title":"Exam scores","x_label":"Score","data":{"values":[62,71,85,90,77,68,74,88,93,59,81,76]},"format":"png"}}'

# returns {"job_id": "...", "status": "queued", "credits_reserved": 1}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"
typedataWhat it draws
barcategories [labels]; series [{name, values}] with one value (or null) per category; horizontal, stackedBar chart, grouped by series, optionally stacked or horizontal.
histogramvalues [numbers]; bins 1 to 100 or bin_width; startEqual-width bins, [from, to) and the last bin [from, to]; default ceil(log2 n) + 1 bins.
boxgroups [{name, values}] (up to 20); whiskers tukey (default) or min_max; horizontalBox and whisker plot; Tukey whiskers at 1.5 x IQR with outliers as dots.
scatterseries [{name, points [[x, y], ...]}]; trendline; point_size 2 to 40Scatter plot with an optional least-squares line and R squared.
dotvalues [numbers]; point_size 2 to 40Dot plot: one dot per value, equal values stack.
stem_leafvalues [numbers]; leaf_unit 0.001 to 1000 (powers of ten)Stem-and-leaf table; digits below the leaf unit are cut, not rounded.
radarindicators [{name, max?}] (3 to 20); series [{name, values}]; shape polygon or circle; fillRadar (spider) chart; one shared scale unless an indicator sets max.

GET /v1/jobs/:id

Returns status (queued, running, succeeded, failed, timeout), result (pages, bytes, timings), download_url and expires_at once the job succeeded, error and timestamps. A key can only read its own jobs.

download_url is a short-lived signed link (10 minutes by default): fetch the file from it directly, no API key needed. Request the job again for a fresh link. Results are deleted at expires_at: 1 day on the free plan, 7 days on Starter and Pro, 30 days on Business and Scale; after that download_url is null and result_expired is true.

GET /v1/usage

Returns the current period, your plan, the credit balance (plan credits and top-up credits) and recent debits.

Credits and errors

  • A simple render costs 1 credit, reserved when you submit and settled when the job ends. Credits for failed and timed-out jobs are returned.
  • 400 invalid parameters, 401 invalid key, 402 insufficient_credits, 429 rate limited (see Retry-After), 501 feature reserved but not available (templates, webp).
  • Each job renders in a fresh browser context inside a resource-limited worker container, with a hard timeout. Requests to private network addresses are blocked.