Task API
Ticket Draft Generation
Submit a product or technical spec, poll an asynchronous model job, and retrieve canonical provider-neutral ticket drafts. IssueHub or another upstream system owns provider sync after generation.
What a Client Needs
- An API key created in the admin UI at
/admin/clients. - Scopes:
tickets:submit,tickets:read, and optionallytickets:cancel. - A bearer token header on REST and gRPC calls:
Authorization: Bearer <api_key>. - A stable
idempotency_keyfor retry-safe submissions.
REST Flow
1. Submit a job
curl -sS -X POST http://127.0.0.1:8080/tickets/v1/jobs \
-H "Authorization: Bearer $TASKFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema_version": "tickets.input.v1",
"idempotency_key": "spec-job-uuid-or-stable-client-key",
"title": "Customer Billing Reconciliation Workspace",
"spec": "Full or condensed product/technical spec text",
"options": {
"ticket_count": 3,
"max_ticket_count": 6,
"include_epics": true,
"dependency_mode": "explicit",
"output_detail": "standard"
}
}'2. Poll status
curl -sS http://127.0.0.1:8080/tickets/v1/jobs/$JOB_ID \
-H "Authorization: Bearer $TASKFORGE_API_KEY"3. Fetch result
curl -sS http://127.0.0.1:8080/tickets/v1/jobs/$JOB_ID/result \
-H "Authorization: Bearer $TASKFORGE_API_KEY"Submit Response
{
"schema_version": "tickets.job.v1",
"job_id": "019e4fae-f96a-78b2-be03-8633c38ea640",
"status": "queued",
"status_url": "/tickets/v1/jobs/019e4fae-f96a-78b2-be03-8633c38ea640",
"result_url": "/tickets/v1/jobs/019e4fae-f96a-78b2-be03-8633c38ea640/result",
"created_at": "2026-05-22T12:35:27.722228+00:00"
}Canonical Result
Results return one top-level tickets[] array. TaskForge does
not return github_issues[] or jira_tickets[] as
primary result lists.
{
"schema_version": "tickets.result.v1",
"job_id": "019e4fae-f96a-78b2-be03-8633c38ea640",
"source": {
"title": "Customer Billing Reconciliation Workspace",
"summary": "Workspace for finance and support teams to investigate customer billing discrepancies."
},
"tickets": [
{
"external_id": "SPEC-1",
"ticket_type": "story",
"title": "Show invoices, payments, refunds, and credits",
"description": "Display billing records needed to investigate customer discrepancies.",
"acceptance_criteria": ["Invoice table shows number, status, amount, and due date."],
"labels": ["billing", "ui"],
"dependencies": [],
"story_points": 5,
"priority": "high",
"parent_external_id": null,
"metadata": {
"component": "billing",
"suggested_milestone": "Billing reconciliation",
"confidence": 0.84
}
}
],
"risks": [],
"open_questions": [],
"generation": {
"model": "qwen3:1.7b",
"duration_ms": 388400,
"prompt_tokens": null,
"completion_tokens": null,
"finish_reason": "stop"
}
}Endpoints and Scopes
| Method | Path | Scope | Purpose |
|---|---|---|---|
| POST | /tickets/v1/jobs | tickets:submit | Create an async ticket-generation job. |
| POST | /v1/task-generation/jobs | tickets:submit | Compatibility alias for submit. |
| GET | /tickets/v1/jobs | tickets:read | List jobs owned by the API key's client. |
| GET | /tickets/v1/jobs/{job_id} | tickets:read | Read job status. |
| GET | /tickets/v1/jobs/{job_id}/result | tickets:read | Read completed result JSON. |
| DELETE | /tickets/v1/jobs/{job_id} | tickets:cancel | Request job cancellation. |
| GET | /tickets/v1/schema | tickets:read | Read schema metadata and result schema. |
Ticket Rules
external_idis unique in the result and matchesSPEC-<number>.ticket_typeisepic,story,task,bug, orspike.acceptance_criteriacontains 1 to 8 non-empty strings.dependenciesand related IDs reference tickets in the same result.story_pointsis 1 to 100 ornull;priorityislow,medium,high,critical, ornull.
gRPC
Use package taskforge.tickets.v1, service
TicketsService. The public proto is published at
/openapi/tickets.v1.proto.
grpcurl -plaintext \
-H "authorization: Bearer $TASKFORGE_API_KEY" \
-d '{"schema_version":"tickets.input.v1","idempotency_key":"stable-key","title":"Plan","spec":"Build it"}' \
127.0.0.1:50051 taskforge.tickets.v1.TicketsService/SubmitJob