DeepAI Guides

Guides

Image upscaling API: DeepAI super resolution or creative upscale

Markdown

DeepAI's image upscaling API offers two ways to enlarge a small, soft or compressed image. Super resolution sharpens the detail already in the image for $0.01, and creative upscale adds new detail as it enlarges, for $0.08. Send POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/torch-srgan or POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/creative-upscale with the image URL and a free agent credential from auth.md, pay the 402 price quote, and read output_url from the response.

At a glance

  • Endpoints: POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/torch-srgan (super resolution) and POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/creative-upscale (creative upscale), one image per request
  • Body: {"image": "<image URL>"} as JSON, or the file as image in multipart/form-data
  • Price per image: super resolution $0.01, creative upscale $0.08
  • Credential: an agent credential on every call, paid retries included, sent as Authorization: Bearer <token>, or as ZC-Agent-Authorization: Bearer <token> beside an MPP payment. Registering one at auth.md is free and can be anonymous, and its steps leave the access token in ACCESS_TOKEN, as the examples below use.
  • Payment: each request answers with a 402 price quote, paid from a wallet over x402 or MPP.
  • Response: JSON with id (the job identifier) and output_url (the link to the upscaled image)
  • Prepaid option: Credits, from $0.50, for calls that draw down a balance
  • Full purchase flow: the buyer skill

Choose super resolution or creative upscale

Start with super resolution. Switch to creative upscale when sharpening the existing detail is not enough.

Your image and goalEndpointPrice per image
A photo to enlarge for print/api/torch-srgan$0.01
A small or compressed source whose detail needs recovering/api/torch-srgan$0.01
A small or soft image that needs new detail added as it enlarges, not only sharpening/api/creative-upscale$0.08

Both endpoints take the same request body and return id and output_url. They differ in path, price and what they do to the detail.

Upscale an image

  1. Send the image URL to the endpoint you chose. The example image is a public-domain NASA photo:

    curl -i -X POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/torch-srgan \
      -H "Authorization: Bearer $ACCESS_TOKEN" \
      -H 'Content-Type: application/json' \
      -d '{"image": "https://images-assets.nasa.gov/image/LRC-1958-B701_P-03376/LRC-1958-B701_P-03376~small.jpg"}'
    

    For creative upscale, send the same body to https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/api/creative-upscale. To upload a local file instead, send it as a form field: -F image=@photo.jpg.

    The storefront answers with a 402 price quote, with the exact amount in payment.amountUsd.

  2. Pay the 402 with an x402 or MPP client, which resends the identical request with the proof attached and the same bearer. The buyer skill covers each rail.

  3. Read the response. A paid call returns a JSON object of this shape:

    {"id": "<job id>", "output_url": "<link to the upscaled image>"}
    

    The example request above, sent to super resolution, paid $0.01. The same photo sent to creative upscale paid $0.08 and returned the same two fields.

  4. Fetch the image from output_url and save it:

    curl -sL "<output_url>" -o upscaled-photo
    

    The paid response also carries a zc-billing header, and its chargedUsd field states what the call charged.

Boundaries

  • The request takes image, and creative upscale's JSON body also takes an optional seed. Neither route has a scale factor, target size or style setting.
  • One image per request, and each call gets its own 402.
  • Each payment covers one request. A different image needs a fresh 402.
  • Card pays a pay-as-you-go call only when that call costs $0.50 or more. For calls below that amount, pay with x402 or MPP, or buy Credits by card from $0.50.
  • Buying Credits uses the same credential; the buyer skill has the steps.

Errors

ResponseMeaningAction
402 with a payment blockThe price quotePay it and retry the same request, or stop
settlement_failedThe payment did not settle; settlementReason says why, such as insufficient_fundsFix the wallet, then send the request again for a fresh 402
payment_request_mismatchA payment was reused for a different requestRequest a fresh 402 for this request and pay that one
invalid_request (400)The request body is malformedFix the JSON and resend
usage_exhaustedYour Credits balance is used upTop up with POST https://deepai.pay.zeroclick.io/zcj/uuefinqj0sud/extend, or pay per call

After a paid call reaches DeepAI, error responses carry DeepAI's own status code and body.

Frequently asked questions

What is the difference between super resolution and creative upscale?

Super resolution enlarges an image and sharpens the detail it already contains. It suits photos headed for print and small or compressed sources. Creative upscale adds new detail as it enlarges, for a small or soft image that needs more than sharpening. It costs $0.08 per image, against $0.01 for super resolution.

Do I need an API key to use DeepAI's upscaling API?

No DeepAI account or API key, but every call carries a free agent credential from auth.md, registered once and anonymously if you like. You then pay the 402 for each image over x402 or MPP.

How much does it cost to upscale 100 images?

$1 with super resolution, or $8 with creative upscale. Each image is a separate call, and each call's 402 states the exact price before you pay.

Can I upload an image file instead of sending a URL?

Yes. Both endpoints accept multipart/form-data with the file in the image field, as well as a JSON body with an image URL.

Can I pay for an upscale by card?

Card pays a single pay-as-you-go call only when it costs $0.50 or more. For smaller calls, buy Credits by card from $0.50 with the same credential, and each call then draws down the balance.

Keep reading