Overview

The databurger API gives you programmatic access to the training-data pipeline: search and purchase standard datasets, publish video-evaluation tasks, drive labeling jobs, query the scenario library, and read ledger and invoice data. Everything is HTTPS + JSON.

ItemValue
Base URLhttps://aidataburger.com/api/v1
Compatibilityhttps://aidataburger.com/api is equivalent to /api/v1
EncodingHTTPS, UTF-8 JSON for requests and responses
AuthenticationSession token sent as Authorization: Bearer <token>
Full endpoint listMachine-readable at /openapi.json (OpenAPI 3)
Version v1 does not provide an API key / scope system. Authentication uses the session token returned after sign-in, and write access is governed by account role (buyer / judge).

Quick start

Sign in and get a token

Call POST /login-password with phone and password.

Verify connectivity

Call GET /me to confirm the token and read account ID, role and balance.

Search or publish

GET /datasets and GET /scenario-tasks are read-only; POST /tasks freezes the task amount from your wallet.

Drive through to settlement

Claim → submit → buyer accepts. Funds reach the judge only after acceptance.

Copy# 1) Sign in
curl -X POST "https://aidataburger.com/api/v1/login-password" \
  -H "Content-Type: application/json" \
  -d '{"phone":"13800000000","password":"********","role":"buyer"}'

# Response
{ "token": "3f9a1c...", "user": { "id": 1, "phone": "13800000000", "role": "buyer", "balance": 4010.0 } }

# 2) Verify the token
curl "https://aidataburger.com/api/v1/me" -H "Authorization: Bearer $DB_TOKEN"

Authentication

POST/login-passwordSign in with phone + password; recommended for server-side integration
POST/send-codeSend an SMS code (requires the SMS channel to be enabled)
POST/loginSign in with phone + SMS code; role and invite code supported
GET/meCurrent account: ID, role, balance, KYC and 2FA status
FieldTypeRequiredNotes
phonestringyesPhone number
passwordstringyes (password login)Account password
codestringyes (code login)SMS verification code
rolestringnobuyer or judge; defaults to judge
totp_codestringnoRequired when 2FA is enabled (TOTP or backup code)
  • Using the token: send Authorization: Bearer <token> on every request. An expired token returns 401 {"detail":"..."}; sign in again.
  • Brute-force protection: five failed sign-in attempts for the same phone within 15 minutes trigger a temporary lock, returning 429.
  • Roles: publishing tasks, topping up and buying datasets require buyer; claiming and submitting require judge. Cross-role calls return 403.
  • Handling: the token is equivalent to account credentials. Never embed it in browser or mobile code.

Datasets

GET/datasetsList datasets on sale (no auth required)
GET/datasets/{did}Dataset detail including first-pass rate
GET/datasets/{did}/sampleFree sample to verify field structure
GET/datasets/{did}/reportQC summary: pass rate, consistency, honeypot accuracy
GET/datasets/mineDatasets you purchased (buyer token)
POST/datasets/{did}/buyPlace an order; insufficient balance returns 400
POST/datasets/{did}/extendRequest a license extension
POST/datasets/{did}/feedbackSubmit feedback
ParameterInRequiredNotes
domainquerynoembodied / compliance / ecommerce / auto / finance / medical
ratingbodynoFeedback score, integer 1-5
comment / notebodynoFeedback text / extension note
Copy# Search datasets
curl "https://aidataburger.com/api/v1/datasets?domain=medical"

# Response (excerpt)
[ { "id": 6, "title": "Medical image segmentation set", "domain": "medical",
    "formats": ["json","coco"], "price": 5990.0, "samples": 1500, "status": "on" } ]

Tasks and state machine

Task lifecycle: open → assigned → submitted → done. Funds settle only on the last step.

StatusMeaningFunds
openPublished, waiting to be claimedTask amount frozen from the buyer wallet on publish
assignedClaimed; a rejection returns here with reject_reasonStays frozen - neither refunded nor paid out
submittedJudge submitted, awaiting buyer reviewNot yet paid out
doneAccepted by the buyerSettled to the judge at this point
POST/tasksPublish a task (buyer); freezes the task amount
GET/tasks/openTasks available to claim (judge)
GET/tasks/mineTasks you published or claimed
POST/tasks/{tid}/claimClaim a task (judge)
POST/tasks/evaluateSubmit scores (judge); does not settle
POST/tasks/{tid}/evaluateSame, with the task ID in the path
POST/tasks/{tid}/rejectReject for rework (buyer)
POST/tasks/{tid}/acceptAccept (buyer); settles now
ParameterTypeRequiredNotes
titlestringyesTask title
video_urlstringyesURL of the video to evaluate
descstringnoTask description
criteriastring[]noScoring dimensions; defaults to the five platform dimensions
task_idintnoBody field for /tasks/evaluate; omit it when using /tasks/{tid}/evaluate
scoresobjectyesScore per dimension
notes / flagsstring / arraynoNotes and flags
reasonstringnoRejection reason; stored in reject_reason for the judge
Pricing (from GET /config): task price = 8 + 2 × (dimensions − 1), judge payout = price × (1 − 0.25). A five-dimension task is ¥16 billed, ¥12 paid out, ¥4 platform fee. Publishing with insufficient balance returns 400.

Labeling jobs

GET/labeling/jobsList jobs; filter by status
POST/labeling/jobsCreate a job: title, type, payload, assignee_id
POST/labeling/jobs/{jid}/claimClaim a job
POST/labeling/jobs/{jid}/submitSubmit results: content, scores
POST/labeling/jobs/{jid}/qcQC decision: decision (approve / reject), note
GET/labeling/qc-queueQueue awaiting QC
GET/labeling/consistencyConsistency statistics

type values: video_judge, trajectory, pcd_6dof.

Scenario library

Entity-operation SOP library. Publicly readable.

GET/scenario-tasksSearch by category and keyword, paginated
GET/scenario-tasks/metaCategory tree and totals
GET/scenario-tasks/claimedScenarios you claimed (auth required)
POST/scenario-tasks/{tid}/claimClaim a scenario
ParameterTypeDefaultNotes
l1 / l2stringemptyPrimary / secondary category
qstringemptyKeyword matched against title and SOP body
limitint50Page size; values outside 1-200 fall back to 50
offsetint0Offset

Account and funds

GET/ledgerLedger: top-ups, task spend, settlement income
GET/invoicesInvoices
POST/rechargeTop up the wallet (buyer); amount must be > 0
GET/withdrawalsWithdrawal records
POST/withdrawRequest a withdrawal
POST/kycIdentity verification: real_name, id_card
POST/me/profileUpdate display name
POST/me/passwordSet or change the password
GET/projectsProject board: stage, progress, report availability
GET/collectionsCollection batch progress
GET/notificationsIn-app notifications

Public platform metrics

The "live platform data" block on the homepage calls this endpoint. No authentication required.

GET/metrics/publicOnline annotators, tasks completed today, average review time, first-pass rate
Copycurl "https://aidataburger.com/api/v1/metrics/public"

# Response
{ "online": 101, "today": 0, "review": 18.5, "pass": 92.0,
  "cities": 12, "batches": 4, "updated_at": "2026-10-02T14:41:16.343607" }

Reports

The ticket number is generated server-side and returned only after the record is persisted.

POST/reportsSubmit a report; returns the ticket
ParameterTypeRequiredNotes
kind / targetstringnoReport type and subject
detailstringyesDescription, 10-5000 characters
evidencestringnoEvidence link
contact_name / contactstringnoContact person and contact details
agreedboolyesMust be true: consent to the stated handling

Error codes

HTTPScenarioResponseWhat to do
400Business validation failed{"detail":"insufficient balance..."}Fix the input or top up first
401Missing or expired token{"detail":"not signed in or session expired"}Sign in again
403Role not allowed{"detail":"judges only"}Check the account role
404Resource not found{"detail":"dataset not found"}Re-query to confirm the ID
422Invalid parameter type{"detail":[{"loc":["body","scores"],...}]}Check types and required fields
429Temporary sign-in lock{"detail":"too many failed attempts..."}Wait for the lock to expire
5xxServer error{"detail":"Internal Server Error"}Retry with backoff and contact support
Errors follow the FastAPI shape: a single message is {"detail":"..."}; validation errors are {"detail":[{"loc":[...],"msg":"..."}]}. API 404s return JSON, not an HTML error page.

Calling conventions

  • Rate limits: no QPS limit on business endpoints in v1; only the sign-in endpoint has failed-attempt protection.
  • Billing: read endpoints are free; tasks and purchases are billed by amount.
  • Timeouts: 5s connect, 30s read. Retry only on 5xx and network errors with exponential backoff; never retry 4xx.
  • Idempotency: publishing, purchasing and top-ups debit immediately. Do not blindly replay after a timeout - check /ledger first.

Webhooks

Version v1 does not offer webhook callbacks. Poll instead: GET /tasks/mine for task status, GET /notifications for in-app notices, GET /projects for project stages. Event push will ship in a later version under a new version number, leaving v1 callers unaffected.

SDKs and samples

There are no official SDK packages for v1. Do not install any third-party databurger or @databurger/sdk package. The samples below run as-is.

Python (standard library only)

Copyimport json, urllib.request

BASE = "https://aidataburger.com/api/v1"

def call(method, path, token=None, body=None):
    data = json.dumps(body).encode() if body else None
    req = urllib.request.Request(BASE + path, data=data, method=method)
    req.add_header("Content-Type", "application/json")
    if token:
        req.add_header("Authorization", "Bearer " + token)
    with urllib.request.urlopen(req, timeout=30) as r:
        return json.loads(r.read().decode())

# Sign in
resp = call("POST", "/login-password", body={
    "phone": "13800000000", "password": "********", "role": "buyer"})
token = resp["token"]

# Search datasets
for ds in call("GET", "/datasets?domain=medical"):
    print(ds["id"], ds["title"], ds["samples"], ds["price"])

JavaScript (native fetch)

Copyconst BASE = "https://aidataburger.com/api/v1";

async function call(path, { method = "GET", token, body } = {}) {
  const r = await fetch(BASE + path, {
    method,
    headers: {
      "Content-Type": "application/json",
      ...(token ? { Authorization: `Bearer ${token}` } : {}),
    },
    body: body ? JSON.stringify(body) : undefined,
  });
  if (!r.ok) throw new Error(`${r.status} ` + await r.text());
  return r.json();
}

// Public endpoint, no token needed
const metrics = await call("/metrics/public");

const { token } = await call("/login-password", {
  method: "POST",
  body: { phone: "13800000000", password: "********", role: "buyer" },
});
const me = await call("/me", { token });

Changelog

2026-10-02 · v1.0

First public version

Established https://aidataburger.com/api/v1 as the public base URL (/api remains equivalent). Completed the task review chain: /tasks/{tid}/reject, /tasks/{tid}/accept, /tasks/{tid}/claim, with the rule "submitting does not settle; accepting does". Fixed /datasets/mine being shadowed by /datasets/{did} and returning 422. API 404s now return JSON instead of the branded HTML error page.

2026-09-30 · internal

Scenario library and reports

Opened /scenario-tasks category search; added POST /reports with server-generated ticket numbers.

2026-09-20 · internal

Datasets and labeling

Dataset search, samples, QC reports and purchase; labeling job creation, claiming, submission and QC decisions.

Docs version v1.0 · last updated 2026-10-02 · matches the live /openapi.json. Breaking changes ship under a new version number, with at least one version of overlap for v1 callers.