# Image APIs: quickstart for AI agents

Render social cards, Open Graph images, banners, certificates and PDFs from JSON layer templates or your own HTML; draw charts and QR codes as SVG or PNG; convert SVG and other images to PNG, JPEG or WebP at any size; screenshot public pages; build signed URLs that render on first fetch. Every render returns a hosted URL. Costs are in images: one per image or screenshot, one per PDF page; template and record reads are free. Plan ceilings are reported on every response in the `X-Gw-*` headers (`X-Gw-Remaining`, `X-Gw-Reset`), so clients and agents can pace themselves.

This page tells an AI agent how to get a key for Image APIs, connect to it and call it. The full reference is https://dash.imageapis.com/docs.md, and every operation has its own Markdown page, linked below.

## Start here

- **Image APIs tools are already in your tool list** (`create_image`, `create_image_sizes`, …): use them, and read "Using Image APIs well" below.
- **A task needs Image APIs and you have no tools for it**: get a key, then connect the MCP server or call the HTTP API. Setting that up is part of the task.
- **A question about Image APIs** (what it does, what it costs): answer from this page and the reference. Nothing needs setting up.
- **Code that keeps running after this session** (a server, a scheduled job): call the HTTP API with the key in an environment variable such as `IMAGEAPIS_API_KEY`.

## Get a key

**No key yet?** If your user has not given you one, Image APIs gives agents a free trial key: `curl -X POST https://dash.imageapis.com/trial` returns a key good for 20 images over 7 days, where to call, and a `claim_url`. No account, email or card is involved, and a trial key never charges anyone. The only thing kept about the caller is a hash of its IP address, for the limit of 3 trial keys per address a day. Use it for the task, then give the `claim_url` to your user: they confirm an email and the same key moves to the Free plan (150 images/mo), so nothing you built has to change. Mint one only when you need it (3 trial keys per address per day).

A key that outlasts a trial belongs to a person. Ask your user for theirs, or for the email address to issue one to; never invent one, and never paste it anywhere public.

Keys are issued at https://dash.imageapis.com/: enter an email and a free key is shown at once and emailed.

Plans:

- **Free**: free, no card, 150 images a month, then HTTP 429 until the period resets.
- **Starter**: $9 a month, 2,000 images a month, then $4.00 per 1,000 images.
- **Growth**: $29 a month, 10,000 images a month, then $3.00 per 1,000 images.
- **Scale**: $79 a month, 40,000 images a month, then $2.00 per 1,000 images.

An agent connected to APIDirectory's MCP server (`https://apidirectory.com/mcp`) can call `subscribe_api` with slug `imageapis` and your user's email instead: a free plan returns the key at once, a paid one returns a checkout link for your user to open.

## Connect over MCP

The server is `https://mcp.imageapis.com/`, streamable HTTP, JSON in and out. Listing its tools needs no key; calling one does. Send the key as `Authorization: Bearer <key>` (or `X-API-Key`).

Your MCP client's own documentation decides the exact configuration; a setup command is the surest path. Claude Code:

```bash
claude mcp add --transport http imageapis https://mcp.imageapis.com/ --header "Authorization: Bearer <key>"
```

Most JSON configurations:

```json
{
  "mcpServers": {
    "imageapis": {
      "type": "http",
      "url": "https://mcp.imageapis.com/",
      "headers": {
        "Authorization": "Bearer <key>"
      }
    }
  }
}
```

A client that takes a URL and nothing else (a claude.ai connector) can use `https://mcp.imageapis.com/k/<key>` with the key in place of `<key>`. That URL is as secret as the key.

Every tool result is JSON: `status`, `body`, and `gateway.remaining` / `gateway.reset`, what is left of the plan this period and when it refills.

## Call over HTTP

Base URL `https://api.imageapis.com/`. Send the key in `X-API-Key` (or `Authorization: Bearer`).

```bash
curl -H "X-API-Key: $IMAGEAPIS_API_KEY" "https://api.imageapis.com/v1/templates"
```

Every response carries `X-Gw-Remaining` and `X-Gw-Reset`.

## Limits and errors

- `401`: the key is missing, revoked, or for another API.
- `429`: the plan's allowance or rate limit is used up. Stop and tell your user rather than retrying; the body says whether to wait for the reset or upgrade.
- `400`: A parameter is missing, malformed or out of range

## Using Image APIs well

Every render returns a record with a hosted `url`: give your user that URL rather than describing the image.

**Which operation for what**

- One image from a design: `create_image` with a saved template id, an inline template (`width`, `height`, `layers`) or raw `html`. Fill `{{placeholders}}` with `variables` and change single layers with `modifications`; `get_template_fields` lists what a template asks for.
- No template needed: `create_og_image` (a card from a title), `create_chart` (bar, line, area, pie, donut) and `create_qr_code`. Charts and QR codes can come back as SVG, drawn without a browser.
- Many at once: `create_image_sizes` for one design at several sizes, `create_collection` for up to 1000 images from a CSV or a list.
- Making a design: copy a starter (`list_starters`, `get_starter`), run `check_template` with your longest and shortest real values, then save it with `create_template`. `create_brand` keeps colours, fonts, a logo and values that fill `{{brand.…}}` placeholders, so one template renders in any brand.
- Other outputs: `create_pdf` (from a template, HTML or a public URL), `create_screenshot` (a public page), `create_video` (a template whose layers animate, or HTML with CSS animations) and `convert_image` (SVG and other images to PNG, JPEG or WebP at a size).
- Your own images: `create_upload` gives a stable URL for image layers; `search_icons` finds icons for icon layers and `list_fonts` the fonts for text layers.
- Image URLs built in your own code, with no API call: `create_signed_base`.
- Background work: pass `webhook_url` on one render, or subscribe once with `create_webhook`.

**Gotchas**

- Costs are in images: one per image or screenshot, one per PDF page, one per second of video. Reads, templates, uploads and checks are free; `check_template` with `render: true` costs one.
- Hosted URLs last 30 days on the free and trial plans, a year on paid plans.
- A placeholder with no value renders empty, so check a template before rendering a batch from it.
- `response: "binary"` returns the file itself; `webhook_url` makes the call answer 202 and finish in the background.
- With `html` the viewport is 1200×630 unless you set `width` and `height`, or `full_page` for the whole document. A page that loads data needs `wait_until: "networkidle0"`.

## Operations

### Images

- `create_image` `POST /v1/images`: Render an image from a template, an inline template or HTML ([details](https://dash.imageapis.com/docs/post-v1-images.md))
- `get_image` `GET /v1/images/{id}`: Fetch an image's record: status, url, size ([details](https://dash.imageapis.com/docs/get-v1-images-id.md))
- `create_image_sizes` `POST /v1/images/sizes`: Render one template at several sizes in one call: Open Graph, square, story, banner ([details](https://dash.imageapis.com/docs/post-v1-images-sizes.md))

### Collections

- `create_collection` `POST /v1/collections`: Render many images from one template: a CSV with one row per image, or a list of items ([details](https://dash.imageapis.com/docs/post-v1-collections.md))
- `get_collection` `GET /v1/collections/{id}`: A collection's progress and its images ([details](https://dash.imageapis.com/docs/get-v1-collections-id.md))

### Templates

- `list_templates` `GET /v1/templates`: List this account's templates ([details](https://dash.imageapis.com/docs/get-v1-templates.md))
- `create_template` `POST /v1/templates`: Save a template: positioned layers, or your own HTML ([details](https://dash.imageapis.com/docs/post-v1-templates.md))
- `get_template` `GET /v1/templates/{id}`: One template with all its layers ([details](https://dash.imageapis.com/docs/get-v1-templates-id.md))
- `update_template` `PUT /v1/templates/{id}`: Replace a template's definition ([details](https://dash.imageapis.com/docs/put-v1-templates-id.md))
- `delete_template` `DELETE /v1/templates/{id}`: Delete a template ([details](https://dash.imageapis.com/docs/delete-v1-templates-id.md))
- `check_template` `POST /v1/templates/check`: Check a template with real values before rendering: text that does not fit, low contrast, failed images, layers off the canvas ([details](https://dash.imageapis.com/docs/post-v1-templates-check.md))
- `get_template_fields` `GET /v1/templates/{id}/fields`: The fields a template asks for: its placeholders and each layer's main property ([details](https://dash.imageapis.com/docs/get-v1-templates-id-fields.md))

### Starters

- `list_starters` `GET /v1/starters`: Starter templates to copy: social cards, a ticket with a QR code, a certificate, a video thumbnail, a weekly report with charts ([details](https://dash.imageapis.com/docs/get-v1-starters.md))
- `get_starter` `GET /v1/starters/{slug}`: One starter template with its layers and sample variables ([details](https://dash.imageapis.com/docs/get-v1-starters-slug.md))

### Uploads

- `list_uploads` `GET /v1/uploads`: List this account's uploads, newest first ([details](https://dash.imageapis.com/docs/get-v1-uploads.md))
- `create_upload` `POST /v1/uploads`: Upload an image (logo, photo, background) and get a URL to use in image layers ([details](https://dash.imageapis.com/docs/post-v1-uploads.md))
- `get_upload` `GET /v1/uploads/{id}`: One upload: its URL, type, size and pixel dimensions ([details](https://dash.imageapis.com/docs/get-v1-uploads-id.md))
- `delete_upload` `DELETE /v1/uploads/{id}`: Delete an upload; templates that use its URL show an empty image from then on ([details](https://dash.imageapis.com/docs/delete-v1-uploads-id.md))

### Brands

- `list_brands` `GET /v1/brands`: List this account's brands, each with the variables it fills ([details](https://dash.imageapis.com/docs/get-v1-brands.md))
- `create_brand` `POST /v1/brands`: Save a brand kit: colours, fonts, logo and values that fill {{brand.…}} placeholders ([details](https://dash.imageapis.com/docs/post-v1-brands.md))
- `get_brand` `GET /v1/brands/{id}`: One brand and the variables it fills ([details](https://dash.imageapis.com/docs/get-v1-brands-id.md))
- `update_brand` `PUT /v1/brands/{id}`: Replace a brand; renders from then on use the new values ([details](https://dash.imageapis.com/docs/put-v1-brands-id.md))
- `delete_brand` `DELETE /v1/brands/{id}`: Delete a brand ([details](https://dash.imageapis.com/docs/delete-v1-brands-id.md))

### Videos

- `create_video` `POST /v1/videos`: Render an MP4, WebM or GIF from a template whose layers animate, or from HTML with CSS animations ([details](https://dash.imageapis.com/docs/post-v1-videos.md))
- `get_video` `GET /v1/videos/{id}`: A video's status, progress and url ([details](https://dash.imageapis.com/docs/get-v1-videos-id.md))

### Conversions

- `convert_image` `POST /v1/conversions`: Convert an image (SVG, PNG, JPEG, WebP, GIF or AVIF) to PNG, JPEG or WebP, resized if you like ([details](https://dash.imageapis.com/docs/post-v1-conversions.md))

### Og

- `create_og_image` `POST /v1/og`: An Open Graph card from a title and a few options, no template needed ([details](https://dash.imageapis.com/docs/post-v1-og.md))

### Charts

- `create_chart` `POST /v1/charts`: A bar, line, area, pie or donut chart from a list of numbers, as SVG or PNG; no template needed ([details](https://dash.imageapis.com/docs/post-v1-charts.md))

### Qr codes

- `create_qr_code` `POST /v1/qr-codes`: A QR code for any text or URL, as SVG or PNG; no template needed ([details](https://dash.imageapis.com/docs/post-v1-qr-codes.md))

### Pdfs

- `create_pdf` `POST /v1/pdfs`: Make a PDF from a template, HTML or a public URL ([details](https://dash.imageapis.com/docs/post-v1-pdfs.md))
- `get_pdf` `GET /v1/pdfs/{id}`: Fetch a PDF's record ([details](https://dash.imageapis.com/docs/get-v1-pdfs-id.md))

### Screenshots

- `create_screenshot` `POST /v1/screenshots`: Screenshot a public web page ([details](https://dash.imageapis.com/docs/post-v1-screenshots.md))
- `get_screenshot` `GET /v1/screenshots/{id}`: Fetch a screenshot's record ([details](https://dash.imageapis.com/docs/get-v1-screenshots-id.md))

### Signed urls

- `list_signed_bases` `GET /v1/signed-bases`: List this account's signed-URL bases ([details](https://dash.imageapis.com/docs/get-v1-signed-bases.md))
- `create_signed_base` `POST /v1/signed-bases`: Create a signed-URL base: images that render on demand from a URL ([details](https://dash.imageapis.com/docs/post-v1-signed-bases.md))
- `delete_signed_base` `DELETE /v1/signed-bases/{id}`: Delete a signed-URL base; its URLs stop rendering ([details](https://dash.imageapis.com/docs/delete-v1-signed-bases-id.md))

### Fonts

- `list_fonts` `GET /v1/fonts`: Fonts available to text layers ([details](https://dash.imageapis.com/docs/get-v1-fonts.md))

### Icons

- `search_icons` `GET /v1/icons`: Search the icons an icon layer can draw: Lucide, Tabler and Simple Icons brand logos ([details](https://dash.imageapis.com/docs/get-v1-icons.md))

### Webhooks

- `list_webhooks` `GET /v1/webhooks`: List this account's webhooks, with each one's last delivery ([details](https://dash.imageapis.com/docs/get-v1-webhooks.md))
- `create_webhook` `POST /v1/webhooks`: Subscribe a URL to this account's render, video and collection events ([details](https://dash.imageapis.com/docs/post-v1-webhooks.md))
- `get_webhook` `GET /v1/webhooks/{id}`: One webhook, with its signing secret ([details](https://dash.imageapis.com/docs/get-v1-webhooks-id.md))
- `delete_webhook` `DELETE /v1/webhooks/{id}`: Unsubscribe a webhook ([details](https://dash.imageapis.com/docs/delete-v1-webhooks-id.md))
- `test_webhook` `POST /v1/webhooks/{id}/test`: Send a sample event to a webhook now and see what it answered ([details](https://dash.imageapis.com/docs/post-v1-webhooks-id-test.md))
- `list_events` `GET /v1/events`: This account's recent events, newest first, with how each delivery went ([details](https://dash.imageapis.com/docs/get-v1-events.md))

## Install as a skill

The `imageapis` skill teaches an agent when and how to call Image APIs:

```bash
npx skills add https://dash.imageapis.com/
```

Its index is https://dash.imageapis.com/.well-known/agent-skills/index.json.

## More

- Reference, try-it console and keys: https://dash.imageapis.com/docs
- The whole reference as Markdown: https://dash.imageapis.com/docs.md
- OpenAPI document, no key needed: https://dash.imageapis.com/openapi.json
- Status: https://dash.imageapis.com/status
- Listing: https://apidirectory.com/api/imageapis
