Skip to content

Workflows

Deterministic multi-step execution. Nodes request capabilities (image.generate), not models or endpoints. Set execution targets (compute_id / endpoint_id) on the workflow when a step needs GPU infrastructure.

POST /v1/workflows

Submit a workflow. Returns 202 with wfl_ id and status: queued.

bash
curl -s -X POST https://api.skilleo.org/v1/workflows \
  -H "Authorization: Bearer $SKILLEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"triple-image","endpoint_id":"ep_...","max_retries":1,"nodes":[{"id":"a","capability":"image.generate","input":{"prompt":"step one"}},{"id":"b","capability":"image.generate","input":{"prompt":"step two"},"depends_on":["a"]},{"id":"c","capability":"image.generate","input":{"prompt":"step three"},"depends_on":["b"]}]}'
FieldNotes
nodes[].capabilityMust exist in /v1/capabilities (e.g. image.generate)
nodes[].depends_onNode ids that must complete first
max_retriesPer-node retries after failure (0–3)

The engine runs nodes in dependency order: job → artifact → next job. Dependent nodes receive from_artifacts in job input mapping upstream artifact ids.

GET /v1/workflows/{id}

Poll until status is completed or failed.

bash
curl -s https://api.skilleo.org/v1/workflows/wfl_abc123 \
  -H "Authorization: Bearer $SKILLEO_API_KEY"

Completed data

FieldDescription
nodesPer-node status, job_id, artifact_id, retry_count
final_artifact_idArtifact from the last node
cost_usdSum of completed job estimates
latency_msWall time from submit to complete
retriesTotal node retries across the run

Failed workflows set error.code on the envelope. Downstream nodes not started are cancelled with UPSTREAM_FAILED.

Example

python
wfl = client.workflows.create(
    name="triple-image",
    nodes=[
        {"id": "a", "capability": "image.generate", "input": {"prompt": "one"}},
        {"id": "b", "capability": "image.generate", "input": {"prompt": "two"}, "depends_on": ["a"]},
        {"id": "c", "capability": "image.generate", "input": {"prompt": "three"}, "depends_on": ["b"]},
    ],
)
done = client.workflows.wait(wfl["id"])
client.artifacts.save(done["data"]["final_artifact_id"], "final.png")

Usage

Workflow cost and latency appear on the workflow envelope (cost_usd, latency_ms). Per-job usage is available through Usage.

Skilleo — /v1 at api.skilleo.org