Omni APIOmni API

Quickstart

Create your first Omni API task.

Quickstart

This page shows the shortest path from API key to task result.

1. Create an API key

Open Console, sign in with Google or email, then create an API key. Keep the key server-side when you build a product.

export OMNI_API_KEY="your_api_key"
export OMNI_API_BASE="https://omniapi.net"

2. List models

curl "$OMNI_API_BASE/api/omni/models"

The response includes model groups, task types, input schema, and output schema. Only ready model groups are shown on the public catalog.

3. Create a text task

Text-only tasks can be created directly.

curl -X POST "$OMNI_API_BASE/api/omni/tasks/create" \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_group":"omni-image-aio",
    "task_type":"text_to_image",
    "input":{"prompt":"a clean studio product photo"}
  }'

The create response returns portal_task_id, status, queue metadata, and output access instructions when available.

4. Create a file-based task

For edit workflows, request upload slots through the same task-create endpoint by sending files_to_upload[]. Upload each file to the returned upload_url, then poll the task status with the returned portal_task_id.

curl -X POST "$OMNI_API_BASE/api/omni/tasks/create" \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_group":"omni-image-aio",
    "task_type":"single_image_edit",
    "input":{"prompt":"make the product photo cleaner"},
    "files_to_upload":[
      {"field":"source_image","filename":"input.png","content_type":"image/png"}
    ]
  }'
curl -X PUT "{uploads[0].upload_url}" \
  -H "Content-Type: image/png" \
  --data-binary @input.png

5. Poll task status

curl "$OMNI_API_BASE/api/omni/tasks/{portal_task_id}" \
  -H "Authorization: Bearer $OMNI_API_KEY"

For queued tasks, the response can include queue position. For successful image and video tasks, outputs are returned through object storage URLs.