Tycoon
Sign In

Quickstart: create your first Task

Five minutes from nothing to a finished result.

1. Mint a key

An owner or admin creates one workspace-scoped key through the session-authenticated developer endpoint (see Authentication and billing). The raw tyc_... token is shown once — store it as a secret.

2. Create one Task

Every create needs an Idempotency-Key header so a retry cannot produce a second Task:

bash
curl -sS https://tycoon.us/api/public/tasks \
  -H "Authorization: Bearer $TYCOON_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: competitor-research-2026-08-01" \
  -d '{"prompt":"Research the three closest competitors and summarize their pricing."}'

Because this request omits workspace_id, Tycoon creates an isolated task-bound workspace for the Task. The API key's controller workspace remains the billing account.

3. Keep the id

The response returns immediately, before any work runs:

json
{
  "task": {
    "id": "cm...",
    "title": "Competitor research",
    "status": "queued",
    "created_at": "2026-08-01T12:00:00.000Z"
  },
  "idempotent_replay": false
}

4. Read it until it is usable

Poll the Task, honoring poll_after_ms between reads:

bash
curl -sS https://tycoon.us/api/public/tasks/cm... \
  -H "Authorization: Bearer $TYCOON_API_KEY"

The read returns status, and once the work is done, result.text plus the actual usage that was metered. Statuses are queued, running, requires_action, waiting, completed, or canceled.

5. Handle the two things that interrupt it

If status is requires_action, read required_actions and resolve the decision from your backend when api_resolvable is true (see Resolve a required action from your backend). If you would rather be told than poll, register a webhook receiver (see Check-in and terminal webhooks).

No SDK, browser session, or knowledge of Tycoon's internal agents is required.

Next steps

War dieser Artikel hilfreich?

Hast du noch eine Frage?

Frage Astra im Chat — sie hat dieselben Dokumente wie du.

Chat öffnen