For the complete documentation index, see llms.txt. This page is also available as Markdown.

Start a technique run

Start a technique run with the FLORA API: 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.

POST https://app.flora.ai/api/v1/techniques/{techniqueId}/runs
  • Auth: API key as a bearer token, Authorization: Bearer $FLORA_API_KEY. See Authentication.

  • TypeScript SDK: client.techniques.runs.create().

  • Idempotency: optional Idempotency-Key header. See Idempotency.

  • Operation ID: startTechniqueRun.

Example

curl -X POST 'https://app.flora.ai/api/v1/techniques/art-directors-critique/runs' \
  -H "Authorization: Bearer $FLORA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "inputs": [
    {
      "id": "<id>",
      "type": "text",
      "value": "<value>"
    }
  ],
  "mode": "async"
}'
import { FloraClient } from '@flora-ai/flora';

const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });

const run = await client.techniques.runs.create({
  techniqueId: 'art-directors-critique',
  inputs: [
    {
      id: '<id>',
      type: 'text',
      value: '<value>',
    },
  ],
  mode: 'async',
});
console.log(run);

Path parameters

Name
Type
Required
Description

techniqueId

string

Yes

Technique identifier or slug. Pattern: ^\S+$. Example: art-directors-critique.

Request body

Required.

Field
Type
Required
Description

inputs

array of objects

Yes

Technique inputs. Media inputs (imageUrl, videoUrl) must be a Flora-hosted or allowlisted media URL. Upload external media via POST /assets first and pass the returned url.

inputs[].id

string

Yes

Technique input identifier

inputs[].type

string

Yes

Technique input type. One of: text, imageUrl, videoUrl, model3dUrl.

inputs[].value

string

Yes

Technique input value. For media inputs (imageUrl, videoUrl), this must be a Flora-hosted or allowlisted media URL. Upload external media via POST /assets first and pass the returned url.

mode

string

Yes

Technique run execution mode. One of: async, stream.

callback_url

string (uri)

No

HTTPS URL that receives a signed POST webhook when the run reaches a terminal state (events run.completed / run.failed). The JSON body is HMAC-SHA256 signed via the Flora-Signature header and delivery is retried up to 3 times with exponential backoff. Must be HTTPS and must not resolve to a private/internal host. See https://docs.flora.ai/api/platform/webhooks for the payload schema and verification example.

idempotency_key

string

No

Idempotency key for safely retrying requests

Responses

200: Technique run started.

Field
Type
Required
Description

run_id

string

Yes

Run identifier. Pattern: ^run_\S+$. Example: run_abc123.

status

string

Yes

One of: pending, running, completed, failed.

progress

number

Yes

created_at

number

Yes

started_at

number

No

completed_at

number

No

error_code

string

No

Machine-readable run error code. Example: provider_error.

error_message

string

No

Human-readable run error message. Example: The provider failed to complete the generation..

charged_cost

number

No

Cost charged in USD. At least 0.

outputs

array of objects

No

outputs[].output_id

string

Yes

Run output identifier. Example: output_1.

outputs[].type

string

Yes

Run output media type. One of: imageUrl, videoUrl, audioUrl, text, documentUrl, model3dUrl.

outputs[].url

string

Yes

Run output URL or text content. At least 1 character. Example: https://media.flora.ai/output.png.

outputs[].asset_id

string

No

Asset identifier for durable media outputs. Pattern: ^asset_\S+$. Example: asset_abc123.

outputs[].label

string

No

Optional output label. Example: preview.

outputs[].tri_count

integer

No

Triangle count for model3d outputs. At least 0.

outputs[].bbox

object

No

Axis-aligned local bounds for model3d outputs

outputs[].bbox.min

array of 3 numbers

Yes

outputs[].bbox.max

array of 3 numbers

Yes

outputs[].textured

boolean

No

Whether the model3d output carries textures

poll_url

string (uri)

No

URL to poll pending/running runs or fetch completed/failed run details.

201: Technique run started.

Same body as 200.

Errors

Every error has the same body: error.code, error.message, and error.fields on validation errors. See Errors for how to recover from each code.

Status
Code
Meaning

400

invalid_json, input_validation_error

The body isn't valid JSON, or an input failed validation (fields lists each one).

401

unauthorized, invalid_api_key

The API key is missing, invalid or revoked.

402

insufficient_credits

The workspace balance is too low for this request.

403

forbidden, paid_plan_required

The key can't do this, or the workspace plan doesn't include it.

404

not_found

The resource doesn't exist or isn't visible to this key.

409

idempotency_duplicate, revision_conflict

Duplicate Idempotency-Key or a stale base_revision.

429

rate_limited

Too many requests. Back off and retry.

500

unknown_error, internal_error

Something failed on FLORA's side. Retry with backoff.

503

temporarily_unavailable

Authorization is temporarily unavailable. Retry later.

Last updated

Was this helpful?