Hosted tool

Edit image

Waiting on a key

Revise an authorized image using a prompt.

ai.image_editversion 2

Price

0.46

credits per image

Availability

Waiting on a key

Waiting on its upstream credential.

Access

Waiting on a key

Category AI

Input

{
  "additionalProperties": false,
  "properties": {
    "output_id": {
      "maxLength": 35,
      "minLength": 35,
      "type": "string"
    },
    "prompt": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string"
    },
    "quality": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "type": "string"
    },
    "size": {
      "enum": [
        "1024x1024",
        "1536x1024"
      ],
      "type": "string"
    }
  },
  "required": [
    "prompt",
    "output_id"
  ],
  "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_edit/invoke \
  -H "Authorization: Bearer <HK_KEY>" \
  -H "Content-Type: application/json" \
  -H 'Idempotency-Key: image_edit-1' \
  -d '{"arguments":{"prompt":"…","output_id":"…"},"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.

ai

Back to the list