Skip to main content
Banan0 API Docs

Run Model

Execute a model run.

Run Model

http
POST /api/v1/models/:modelId/run

Starts a new model execution. Returns immediately with a run ID for polling.

Request Body

FieldTypeRequiredDescription
inputobjectYesModel-specific input parameters
webhook_urlstringNoHTTPS URL to receive completion webhook

Example Request

bash
curl -X POST \
  -H "Authorization: Bearer bnn_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "A serene mountain landscape at sunset",
      "image_size": "landscape_16_9",
      "num_images": 1
    },
    "webhook_url": "https://yoursite.com/webhook"
  }' \
  "https://banan0.com/api/v1/models/fal-ai/flux-pro/run"

Example Response

json
{
  "data": {
    "run_id": "run_abc123xyz",
    "status": "queued",
    "model_id": "fal-ai/flux-pro",
    "model_name": "FLUX Pro",
    "estimated_tokens": 5,
    "is_test_request": false,
    "created_at": "2026-01-13T20:00:00.000Z"
  }
}

Token Billing

  • Tokens are reserved when the run starts
  • Final charge is based on actual execution
  • Test keys (bnn_test_*) are not charged
  • Webhook Delivery

    If webhook_url is provided, we'll POST to it when complete:

    json
    {
      "event": "run.completed",
      "data": {
        "run_id": "run_abc123xyz",
        "model_id": "fal-ai/flux-pro",
        "result": { "images": ["https://..."] },
        "tokens_charged": 5
      }
    }

    Command Palette

    Search for a command to run...