Quickstart
Create a workflow, trigger a run, and read the result in under five minutes — using curl or the official TypeScript SDK.
1. Get an API key#
Create an account, then mint an API key from the dashboard. Keys are shown once at creation — copy it somewhere safe.
Export it so the snippets below can read it from your environment:
export LOOPLLAMA_API_KEY="ll_live_..."2. Install the SDK (optional)#
Every endpoint works with plain HTTP, so curl is enough to get started. For production code, the typed TypeScript SDK is more convenient. Any other language can call the REST API directly.
npm install @loopllama/sdk3. Create a workflow#
A workflow holds the configuration for a run: its name, default model, and a crew of agents. Omit the crew and LoopLlama uses a sensible default — a planner agent followed by a writer.
curl -X POST https://loopllama.ai/api/v1/workflows \
-H "Authorization: Bearer $LOOPLLAMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Brief writer"}'The response contains the new workflow, including its generated id:
{
"data": {
"id": "ckv9...",
"name": "Brief writer",
"description": null,
"status": "active",
"model": "claude-sonnet-4-6",
"crew": [
{ "role": "planner", "systemPrompt": "You are a planning agent..." },
{ "role": "writer", "systemPrompt": "You are a writing agent..." }
],
"created_at": "2026-05-20T17:00:00.000Z"
}
}4. Trigger a run#
Pass the workflow id and an input string. Runs execute asynchronously, so the request returns immediately with a 202 Accepted and a run in the queued state.
curl -X POST https://loopllama.ai/api/v1/workflows/$WORKFLOW_ID/runs \
-H "Authorization: Bearer $LOOPLLAMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "Draft a 200-word brief on a new feature-flag system."}'5. Read the result#
Poll the run until its status is completed (or failed). The full response includes every step the crew took, with per-step token counts.
curl https://loopllama.ai/api/v1/runs/$RUN_ID \
-H "Authorization: Bearer $LOOPLLAMA_API_KEY"ANTHROPIC_API_KEY configured, runs still complete end-to-end using a deterministic stub response. The full pipeline — steps, tokens, and usage — is exercised so you can build and test the integration before wiring up a model provider.Next steps#
Polling is fine for a script. For production, register a webhook and LoopLlama will POST to you the moment a run completes, fails, or pauses for a human.
You've run a workflow end-to-end. From here, learn how to design your own crews in Workflows & crews, or jump straight to the API reference.