Omni API
Omni API Docs

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",
    "inputs":{"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 a signed upload first, upload the file, then create the task once with the returned canonical input_manifest.

curl -X POST "$OMNI_API_BASE/api/omni/tasks/presign" \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_group":"omni-image-aio",
    "task_type":"single_image_edit",
    "files":[
      {"name":"source_image","filename":"input.png","content_type":"image/png","size_bytes":12345}
    ]
  }'
curl -X PUT "{uploads[0].upload_url}" \
  -H "Content-Type: image/png" \
  --data-binary @input.png
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",
    "inputs":{"prompt":"make the product photo cleaner"},
    "input_manifest":{"items":[{"name":"source_image","role":"source_image","object_ref":"inputs/.../input.png","filename":"input.png","media_type":"image","content_type":"image/png","size_bytes":12345}]}
  }'

5. Poll task status

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

Poll only while the task is pending or running, then stop at completed, failed, or canceled. The Public API does not publish estimated wait times or a global queue position. For successful image, video, and audio tasks, outputs are returned through object storage URLs.