Hosted tool

Generate image

Waiting on a key

Create an image with OpenAI quality tiers or fal economy.

ai.image_generateversion 2

Price

0.06

credits per image

Availability

Waiting on a key

Waiting on its upstream credential.

Access

Waiting on a key

Category AI

Input

{
  "additionalProperties": false,
  "properties": {
    "prompt": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string"
    },
    "quality": {
      "enum": [
        "low",
        "medium",
        "high",
        "economy"
      ],
      "type": "string"
    },
    "size": {
      "enum": [
        "1024x1024",
        "1536x1024"
      ],
      "type": "string"
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

Result

object<{output_id:string,mime_type:string,width:integer,height:integer,expires_at:integer,url:string}>

Default fields: output_id mime_type width height expires_at url

Limits

Synchronous deadline15 s
Maximum result65,536 bytes
Result pages1
Long-job deadline240 s
Maximum upstream read12,582,912 bytes

Example call

Provisional: the invoke contract ships with the execution lane

curl https://haidercode.ai/v1/tools/ai.image_generate/invoke \
  -H "Authorization: Bearer <HK_KEY>" \
  -H "Content-Type: application/json" \
  -H 'Idempotency-Key: image_generate-1' \
  -d '{"arguments":{"prompt":"…"},"max_credits":"0.05"}'

Bound every paid call with max_credits, and repeat the same Idempotency-Key to recover a result rather than pay twice.

imagegenerationcreative

Back to the list