Aibubu
Visit Aibubu ↗
Integration guides

API Quickstart

Create an API key, submit your first image task, and retrieve its result using the existing API.

GET/v1/models

This page summarizes the shortest integration path from the API Reference, Authentication, and Tasks and Polling. The API Reference remains the source for full parameters and error definitions.

1. Prepare a workspace and API key

Switch to a personal or team workspace in the developer platform console, then create an API key. Your key determines the workspace that owns tasks, assets, and billing. See API Keys and Workspaces and API Access for details.

Authenticate with the Authorization: Bearer ... header. Use the Models endpoint to confirm available models and check their constraints in the Model Catalog. For funding, see Credits and Top-up.

2. Submit your first image task

The following request creates an image task. Replace the example key with your own and use a different Idempotency-Key for each distinct request.

curl https://aibubu.ai/v1/generations \
  -H "Authorization: Bearer sk_aibubu_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: first-generation-001" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A minimal poster of a city from the future",
    "aspect_ratio": "1:1"
  }'

Save the task_id from the response. See Create a Generation for full request parameters. For reference assets, see Image Uploads and File Uploads.

3. Query the task and retrieve the result

Replace the task ID below with the task_id returned in the previous step.

curl https://aibubu.ai/v1/tasks/task_image_xxx \
  -H "Authorization: Bearer sk_aibubu_your_api_key"

For image tasks, poll every 2–3 seconds and stop when the status is succeeded, failed, canceled, or expired. On success, read result.data[].url. Signed links are valid for approximately 15 minutes after each query; download results promptly for long-term storage. See Tasks and Polling and Get a Task for complete state and result definitions.

Next steps

  • Webhooks: configure production event delivery and keep polling as a fallback.
  • Errors and Retry: handle failed requests and retries.
  • API Usage: review usage and reconciliation guidance.
  • Agent Tools: use Aibubu in AI tools through MCP or Skills.