Skip to content
FLORA DocsGo to app

Start a technique run

$ flora techniques:runs create
POST/techniques/{techniqueId}/runs

Starts a run for a specific technique using the backward-compatible nested route. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

ParametersExpand Collapse
--technique-id: string

Technique identifier or slug

--input: array of object { id, type, value }

Technique inputs

--mode: "async" or "stream"

Technique run execution mode

--callback-url: optional string

HTTPS callback URL for asynchronous run completion notifications

--idempotency-key: optional string

Idempotency key for safely retrying requests

ReturnsExpand Collapse
TechniqueRunNewResponse: object { created_at, progress, run_id, 8 more }
created_at: number
progress: number
run_id: string

Run identifier

status: "pending" or "running" or "completed" or "failed"
"pending"
"running"
"completed"
"failed"
charged_cost: optional number
completed_at: optional number
error_code: optional string

Machine-readable run error code

error_message: optional string

Human-readable run error message

outputs: optional array of object { output_id, type, url }
output_id: string

Run output identifier

type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more

Run output media type

"imageUrl"
"videoUrl"
"audioUrl"
"text"
"documentUrl"
url: string

Run output URL

poll_url: optional string
started_at: optional number

Start a technique run

flora techniques:runs create \
  --api-key 'My API Key' \
  --technique-id art-directors-critique \
  --input '{id: id, type: text, value: value}' \
  --mode async
{
  "created_at": 0,
  "progress": 0,
  "run_id": "run_abc123",
  "status": "pending",
  "charged_cost": 0,
  "completed_at": 0,
  "error_code": "provider_error",
  "error_message": "The provider failed to complete the generation.",
  "outputs": [
    {
      "output_id": "output_1",
      "type": "imageUrl",
      "url": "https://media.flora.ai/output.png"
    }
  ],
  "poll_url": "https://example.com",
  "started_at": 0
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}
Returns Examples
{
  "created_at": 0,
  "progress": 0,
  "run_id": "run_abc123",
  "status": "pending",
  "charged_cost": 0,
  "completed_at": 0,
  "error_code": "provider_error",
  "error_message": "The provider failed to complete the generation.",
  "outputs": [
    {
      "output_id": "output_1",
      "type": "imageUrl",
      "url": "https://media.flora.ai/output.png"
    }
  ],
  "poll_url": "https://example.com",
  "started_at": 0
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}