Imference API – Documentation

Reference for the public endpoints used to generate and retrieve images

Looking for the pricing & quick start page? Go to the main page →

Pay-per-use API

You can test the pay-per-use on our main page

To integrate in your app you can use the quick start guide for buyers from the x402 documentation

Endpoints

POST /ondemand/generate

Generate an on-chain payment and queue a new image generation for a given model and text description.

curl -X POST \
  'https://imference.com/ondemand/generate' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "illustrious-hassuka-xl",
    "prompt": "A cat astronaut floating in space",
    "wallet_address": "0x123"
  }'
GET /ondemand/status

Look up the status of an image generation by its request_id.

curl -X GET \
  'https://imference.com/ondemand/status?request_id=<REQUEST_ID>'