# Can AI agents buy images from Driftflight?

Yes. Driftflight sells text-to-image generation to agents one image at a time, with no account and no API key, and the `sketch` tier costs $0.01. Register a free agent credential, send `POST https://agents.driftflight.com/zcj/xnxm67nisd2w/v1/images/generate` with it as `Authorization: Bearer <token>`, pay the 402 price quote with an x402 or MPP wallet, and retry.

## At a glance

- **Endpoint:** `POST https://agents.driftflight.com/zcj/xnxm67nisd2w/v1/images/generate`, one image per request, with your credential as a bearer token.
- **Body:** JSON with `prompt` (required), `model` (`sketch`, `studio` or `gallery`) and an optional `preset` (`editorial`, `product-studio`, `film-noir`, `botanical`, `watercolor` or `isometric`).
- **Price:** `sketch` $0.01; `studio` $0.06; `gallery` $0.14.
- **Payment:** a 402 is the price quote. You pay it and retry. x402 (Base USDC) and MPP (Tempo USDC) are the wallet rails, and neither needs an account or key, though every call still needs a bearer credential that a wallet cannot replace.
- **Card:** a card buys Prepaid credits from $1, not a single image.
- **Free allowance:** 3, for a bearer credential claimed by a human with a verified email.
- **Response:** JSON with `imageUrl`, `model`, `preset`, `licence` and `credits`. Every paid render includes a commercial licence and C2PA content credentials.
- **Full flow:** [the buyer skill](https://agents.driftflight.com/zcj/xnxm67nisd2w/SKILL.md).

## Generate an image from a text prompt

1. Send the request with your credential as a bearer token. Always set `model`, because a call without it is billed as `studio`.

   ```bash
   curl -sS -X POST https://agents.driftflight.com/zcj/xnxm67nisd2w/v1/images/generate \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: application/json' \
     -d '{"prompt":"a watercolor study of a mountain village at dusk","model":"sketch","preset":"watercolor"}'
   ```

   The response is a 402 price quote, and nothing is charged. A request sent without your bearer credential is refused with 401 bearer_required before any price is quoted. The 402's JSON body carries `payment.amountUsd`, the `plan` and a `protocols` block with an x402 and an MPP challenge. The same challenges also arrive in the `payment-required` and `www-authenticate` headers, which an x402 or MPP client reads directly.

2. Pay the quote and send the same request again with the proof attached and the bearer still on it. For x402, send the proof in the `x-payment` header. For MPP, send it as `Authorization: Payment <credential>`, with the bearer token in `ZC-Agent-Authorization: Bearer <token>`.

3. Read the image response. The example request paid $0.01. The response has this shape:

   ```json
   {
     "imageUrl": "<URL of the image>",
     "model": "<tier>",
     "preset": "<preset>",
     "licence": "<licence>",
     "credits": "<content credentials>"
   }
   ```

4. Download the file by sending a GET request to `imageUrl`, the image's public URL.

| `model` | Price | Listed output |
| --- | --- | --- |
| `sketch` | $0.01 | 1408x768, one image |
| `studio` | $0.06 | 1408x768, one image |
| `gallery` | $0.14 | 1408x768, one image |

## Ways to pay

- **x402 or MPP:** pay each 402 from a wallet. Each call is its own charge, and each call still carries your bearer credential, which the wallet does not supply.
- **Card:** the card rail takes a single call only at $0.50 or more. Each tier's per-image price is below that floor, so a card buys Prepaid credits instead. Credits need a bearer credential, the agent identity the storefront issues, and a purchase of at least $1. Buy them with `POST /plans/{planId}/purchase` and an `amountUsd`, using the Prepaid credits plan listed in [the catalog](https://agents.driftflight.com/zcj/xnxm67nisd2w/manifest.json), and follow [the buyer skill](https://agents.driftflight.com/zcj/xnxm67nisd2w/SKILL.md) for the full flow. Calls then draw down the balance.

## What is charged and when

Nothing is charged until you pay a 402. Paying it completes the purchase and accepts Driftflight's terms and the platform's buyer terms, which are linked in every challenge. A card payment for a delivery that fails is refunded in full.

## Frequently asked questions

### Does Driftflight need an API key or an account for agents?

No account or API key is needed. Every call, paid or free, needs a registered agent credential sent as a bearer token from the first request, and a wallet payment cannot stand in for it. Registering one is free and needs no human step. Claiming it to a human's verified email is optional and can come later: it makes what you buy durable and opens the free allowance.

### Can I pay for one Driftflight image by card?

No. The card rail takes a single call only at $0.50 or more, and each tier is priced below that. With a bearer credential, a card buys Prepaid credits from $1, and each image is then deducted from that balance.

### Who gets the free Driftflight images?

The allowance of 3 belongs to a bearer credential that a human has claimed with a verified email. Send the request with that bearer and the `zc-mode: free` header.

### What licence comes with a Driftflight render?

Every paid storefront render includes a perpetual, worldwide commercial licence and C2PA content credentials. The `licence` and `credits` fields in the response report them.

### Does a higher Driftflight tier give a bigger image?

Every tier lists 1408x768, one image per request. The tiers differ in price. A tier name does not by itself establish quality or licensing.

## Keep reading

- [The buyer skill](https://agents.driftflight.com/zcj/xnxm67nisd2w/SKILL.md): the full purchase flow.
- [How to pay](https://agents.driftflight.com/zcj/xnxm67nisd2w/payment.md): the 402 and each rail.
- [Identity](https://agents.driftflight.com/zcj/xnxm67nisd2w/auth.md): bearer credentials and claiming.
- [The catalog](https://agents.driftflight.com/zcj/xnxm67nisd2w/manifest.json): live prices and plans.

---

Updated 2026-11-17. All Driftflight guides: https://agents.driftflight.com/guides.md. Storefront: https://agents.driftflight.com/zcj/xnxm67nisd2w/llms.txt.
