Start a technique run
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const run = await client.techniques.runs.create({ techniqueId: '<techniqueId>', inputs: [ { id: '<id>', type: 'text', value: '<value>', }, ], mode: 'async',});console.log(run);curl -X POST 'https://app.flora.ai/api/v1/techniques/<techniqueId>/runs' \ -H 'Authorization: Bearer $FLORA_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "inputs": [ { "id": "<id>", "type": "text", "value": "<value>" } ], "mode": "async"}'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.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Technique identifier or slug
Technique identifier or slug
Request Body required
Section titled “Request Body required ”object
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.
object
Technique input identifier
Technique input type
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.
Technique run execution mode
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 docs/system-overviews/webhooks.md for the payload schema and verification example.
Idempotency key for safely retrying requests
Responses
Section titled “ Responses ”Technique run started.
object
Run identifier
Machine-readable run error code
Human-readable run error message
Cost charged in USD
object
Run output identifier
Run output media type
Run output URL or text content
Asset identifier for durable media outputs
Optional output label
Triangle count for model3d outputs
Axis-aligned local bounds for model3d outputs
object
Whether the model3d output carries textures
URL to poll pending/running runs or fetch completed/failed run details.
Example
{ "run_id": "run_abc123", "status": "pending", "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", "asset_id": "asset_abc123", "label": "preview" } ]}Technique run started.
object
Run identifier
Machine-readable run error code
Human-readable run error message
Cost charged in USD
object
Run output identifier
Run output media type
Run output URL or text content
Asset identifier for durable media outputs
Optional output label
Triangle count for model3d outputs
Axis-aligned local bounds for model3d outputs
object
Whether the model3d output carries textures
URL to poll pending/running runs or fetch completed/failed run details.
Example
{ "run_id": "run_abc123", "status": "pending", "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", "asset_id": "asset_abc123", "label": "preview" } ]}