aisplice

By capability

Images

Pick a model, copy the request, get the image. Everything below follows the model you pick.

#1. Pick a model

gpt-image-2.5-ext$0.0065 / requestAsync taskLimits and status

12 models online for this. Switching changes the code below.

#2. Copy the request

Replace YOUR_API_KEY with your key, then run it. Options shown are the ones this model accepts.

POSThttps://www.aisplice.store/v1/images/tasksBearer API keyAsync task

OptionsOnly options published for this model are shown.

# Requires curl and jq
API_KEY="${API_KEY:-YOUR_API_KEY}"

# 1. Submit once
SUBMITTED=$(curl --fail-with-body -sS https://www.aisplice.store/v1/images/tasks \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: model-docs-$(date +%s)-$$" \\
  -d '{
  "model": "GPT Image 2.5 Ext",
  "prompt": "A cinematic scene with careful composition",
  "size": "1:1",
  "resolution": "1K",
  "quality": "auto",
  "n": 1
}')
TASK_ID=$(printf '%s' "$SUBMITTED" | jq -r '.task_id // .id // empty')
if [ -z "$TASK_ID" ]; then
  printf '%s\n' "$SUBMITTED" >&2
  exit 1
fi
echo "task_id=$TASK_ID"

# 2. Poll until terminal
while true; do
  STATUS_JSON=$(curl --fail-with-body -sS \
    "https://www.aisplice.store/v1/images/tasks/$TASK_ID" \
    -H "Authorization: Bearer $API_KEY")
  STATUS=$(printf '%s' "$STATUS_JSON" | jq -r '.status // empty' | tr '[:upper:]' '[:lower:]')
  echo "status=$STATUS"
  case "$STATUS" in
    completed|succeeded|success) break ;;
    failed|failure|cancelled|canceled)
      printf '%s\n' "$STATUS_JSON" | jq .
      exit 1
      ;;
  esac
  sleep 3
done

# 3. Fetch the final result
curl --fail-with-body -sS \
  "https://www.aisplice.store/v1/images/tasks/$TASK_ID/content" \
  -H "Authorization: Bearer $API_KEY" | jq .

This model requires public media URLs. Upload a local file first, then put public_url into the model request. Avoid large Base64 bodies.

Read the upload guide

All parameters

Every field this model accepts, with the allowed values.

model
stringrequired

Exact model identifier for this request.

gpt-image-2.5-ext
prompt
stringrequired

Instruction describing the desired result.

size
stringoptional

Output aspect ratio or dimensions.

auto1:13:22:34:33:45:44:516:99:162:11:23:11:321:99:21
resolution
stringoptional

Requested output resolution.

1K2K4K
quality
stringoptional

For 2K/4K: low uses standard upscaling, auto/medium professional, and high enhanced. 1K returns the original image.

autolowmediumhigh
n
integeroptional
1
images
string[]optional

Optional reference images for editing.

Response lifecycle

Task status, terminal states, and result response examples.

Submit
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "image.task",
  "model": "GPT Image 2.5 Ext",
  "status": "queued"
}
Content
{
  "created": 1720000000,
  "data": [
    {
      "url": "https://media.example/result.png"
    }
  ]
}

Waiting

queued · submitted · in_progress · processing

Success

completed · succeeded · success

Failure

failed · failure · cancelled · canceled

Every field: /v1/images/tasks in the API reference →

#3. Get the result

The submit call answers with a task_id at once. Check the task every few seconds until status is completed, or pass webhook_url and we call you when it is done.

GET https://www.aisplice.store/v1/images/tasks/{task_id}

GET https://www.aisplice.store/v1/images/tasks/{task_id}/content

Charged only when it succeeds

A failed or cancelled task is refunded automatically. The request log shows each task’s final cost.

Status values and polling →Get a callback instead of checking →

#When it goes wrong

  • 400 with a field name: that option is not accepted by this model; use the values listed in step 2.
  • Content refused by the model: rephrase the prompt; refused requests are not charged.
  • 402: the balance cannot cover this request; top up in Wallet, then retry.
  • 429: slow down and retry after the Retry-After seconds.
  • 503 model_not_found: the model name is wrong or the model is offline; pick one from step 1.

Look up any other error →

#Reference images

Pass public image URLs in the reference-image field listed in step 2. For a local file, upload it first and use the URL you get back.

How to upload a local file →

Building it into your productWhich options to show your users first, and which to leave for later.
Which options to show your users firstStart with the prompt and one price knob; add the rest once the basic flow works.+

Creative intent

Fields like prompt belong in the UI because the user directly understands the outcome they change.

Cost multiplier

Fields like duration, resolution, size, and count should be introduced only when pricing is already explainable.

Mode switch

Fields like image, mask, or continuation IDs change the workflow itself and should appear only in dedicated modes.

System plumbing

Fields like webhook_secret are for integrators, not for everyday creators, so keep them out of default UI.

  • prompt
    Expose when
    Always. It is the primary creative input for image tasks.
    Recommended default
    Required in UI.
    Why it matters
    It controls the outcome directly; hiding it makes the feature unusable.
  • size
    Expose when
    Expose in the first release if billing changes by output dimensions.
    Recommended default
    Start with one recommended aspect ratio such as 1:1.
    Why it matters
    It affects both cost and output composition, so users need a simple size choice early.
  • quality
    Expose when
    Expose only after users clearly ask for a higher or cheaper tier.
    Recommended default
    Keep server-side at the model default.
    Why it matters
    It changes price and latency but usually does not need to be a day-one control.
  • n
    Expose when
    Expose only when batch generation is a core workflow.
    Recommended default
    Default to 1.
    Why it matters
    It multiplies cost immediately and can create noisy first-run UX.
  • mask / image
    Expose when
    Expose only for edit or reference-image products.
    Recommended default
    Hide in text-to-image mode.
    Why it matters
    These fields change the product from generation into editing, so they should not leak into the basic flow.
recommended-rollout.txt
Phase 1
- prompt
- one size or one duration default
- submit -> poll -> content

Phase 2
- one quality or resolution selector
- clear pricing hint

Phase 3
- advanced controls such as reference media, continuation, webhook, or vendor-specific tuning

Keep one source of truth for results

When a task finishes, normalize your app around the platform URL returned by /content. That keeps upstream vendor details hidden and makes historical playback stable.

Still stuck?

Send us the request ID or the error message and we will look into it.