Run a task
run_taskUse this first whenever a request needs more than one API call: lists of companies or people, enrichment (founders, emails, funding), multi-source research or comparisons with sources, figures from filings, reading several pages, or any CSV/table deliverable. Give the goal in plain language (for example "find 10 Series A hardware companies in Los Angeles with founders' verified work emails as a CSV" or "compare Vercel, Netlify and Render free-tier limits with source links"); Locus finds and calls the right APIs with this account's credits and spending controls, checks the result, and returns structured data, files, sources, and cost. Use execute only for a single call. If it returns status running, call again with action "wait" and the task_id instead of resubmitting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | What you want done, in plain language. Required to start a task. | |
| action | No | Omit to start a task. Use with task_id to wait, check, cancel, answer a question (respond), or resume. | |
| answer | No | Your answer when the task asks a question. | |
| inputs | No | Optional data for the task, such as URLs, names, or records. | |
| output | No | Optional output preferences. | |
| task_id | No | Task to continue; required with action. | |
| max_credits | No | Hard cap on total task spend in credits, not USD: 1,000 credits = 1 USD unless the account sets another rate. Default 5 USD worth (5000 at that rate), minimum 0.10 USD worth. | |
| wait_seconds | No | How long to wait for completion in this call (default 45). | |
| idempotency_key | No | Reuse to make retried submissions return the same task. | |
| deadline_seconds | No | Stop and deliver what is verified after this many seconds (default 900). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Structured data or answer. | |
| status | No | queued, running, needs_input, completed, partial, unsupported, failed, or canceled. | |
| task_id | No | Durable task id. | |
| artifacts | No | Files with download_url. | |
| continuation | No | How to continue this task, if anything remains. |