Driftflight Guides

Guides

Can AI agents buy images from Driftflight?

Markdown

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. Send POST https://agents.driftflight.com/zcj/57nm4tx2cdkl/v1/images/generate, pay the 402 price quote with an x402 or MPP wallet, and retry.

At a glance

  • Endpoint: POST https://agents.driftflight.com/zcj/57nm4tx2cdkl/v1/images/generate, one image per request.
  • 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.
  • 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.

Generate an image from a text prompt

  1. Send the request. Always set model, because a call without it is billed as studio.

    curl -sS -X POST https://agents.driftflight.com/zcj/57nm4tx2cdkl/v1/images/generate \
      -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. Its 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. The example quote took 0.3 seconds, with nothing paid.

  2. Pay the quote and send the same request again with the proof attached. For x402, send the proof in the x-payment header. For MPP, send it as Authorization: Payment <credential>.

  3. Read the image response. This example paid $0.01 and took 12.6 seconds.

    {
      "imageUrl": "https://api.driftflight.com/[path]",
      "model": "sketch",
      "preset": "watercolor",
      "licence": "commercial",
      "credits": "C2PA content credentials embedded"
    }
    
  4. Download the file by sending a GET request to imageUrl.

modelPriceListed output
sketch$0.011408x768, one image
studio$0.061408x768, one image
gallery$0.141408x768, one image

Ways to pay

  • x402 or MPP: pay each 402 from a wallet. Each call is its own charge.
  • 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, and follow the buyer skill 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. An x402 payment is charged in full when you pay and is not returned if delivery fails.

Frequently asked questions

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

No. A pay-as-you-go call needs no registration, account or API key, because the signed payment on the 402 identifies the payer. A bearer credential is needed to buy Prepaid credits or top them up, and for 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