Appearance
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"]}]}'| Field | Notes |
|---|---|
nodes[].capability | Must exist in /v1/capabilities (e.g. image.generate) |
nodes[].depends_on | Node ids that must complete first |
max_retries | Per-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
| Field | Description |
|---|---|
nodes | Per-node status, job_id, artifact_id, retry_count |
final_artifact_id | Artifact from the last node |
cost_usd | Sum of completed job estimates |
latency_ms | Wall time from submit to complete |
retries | Total 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.