Developer Guide

Wire site checkups into your own pipeline: auth, polling, report shape, CI gating, and error handling.


This page is for people writing code against the API. Everything lives under https://dev.solokit.run. Keyless works; a key raises your quota.

Authentication

ModeHeaderQuota
AnonymousnoneSmall trial, stricter rate limit
API keyAuthorization: Bearer dav_xxx or x-devassist-key: dav_xxxFollows your plan

GET /api/me confirms your identity:

curl -s https://dev.solokit.run/api/me -H "Authorization: Bearer dav_xxx"
# {"auth":"key","userId":"...","message":"..."}

Async checkup: dispatch then poll

Checkups run in a remote sandbox, so they're asynchronous. Two steps:

# 1. Dispatch
TASK=$(curl -s -X POST https://dev.solokit.run/api/sandbox/dispatch \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dav_xxx" \
  -d '{"type":"wcag","url":"https://example.com","options":{"aiCommentary":true}}' \
  | python3 -c 'import sys,json;print(json.load(sys.stdin)["taskId"])')

# 2. Poll
while :; do
  R=$(curl -s "https://dev.solokit.run/api/sandbox/tasks/$TASK")
  S=$(echo "$R" | python3 -c 'import sys,json;print(json.load(sys.stdin)["status"])')
  case "$S" in done|failed|timeout) break;; esac
  sleep 3
done
echo "$R"

Key points:

  • type is one of site-stability, site-validator, performance, wcag, computer-use.
  • One check per dispatch. To run several, dispatch five tasks in parallel — don't chain them.
  • Poll every 3–5 seconds. Don't hammer it at 200ms.
  • idempotencyKey is optional: the same key within a short window reuses the task, which prevents double runs on retry.
  • A single check usually takes ten seconds to a minute. Rendered checks (wcag, computer-use) are slower than static ones.

Report shape

result.report from GET /api/sandbox/tasks/{id} is uniform:

{
  "score": 97,
  "grade": "A",
  "sections": [
    { "id": "contrast", "title": "Contrast", "score": 100, "weight": 25,
      "passed": ["Body contrast ≥ 4.5:1"],
      "issues": [{ "impact": "serious", "title": "Button text contrast too low",
                   "howToFix": "Darken the foreground below #595959" }] }
  ],
  "passed": ["Page declares lang", "..."],
  "issues": [{ "impact": "moderate", "title": "...", "count": 3 }],
  "environment": [{ "code": "WC-ENV-NO-BROWSER", "weight": 0 }]
}
  • score is 0–100; grade is A/B/C/D/F.
  • environment holds environment factors with weight 0 — excluded from the total. Seeing WC-ENV-NO-BROWSER means rendered auditing didn't run and the check fell back to static-only; discount the score accordingly.
  • issues[].impact is critical, serious, moderate, or minor.

Combined report

After all five checks finish, let the server merge them into one report (weighted total + priority fixes + AI commentary):

curl -s -X POST https://dev.solokit.run/api/checkup/report \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dav_xxx" \
  -d '{
    "url": "https://example.com",
    "locale": "en",
    "checks": [
      {"id":"wcag","title":"WCAG","score":97,"grade":"A","passedCount":5,
       "issues":[{"impact":"serious","title":"Button text contrast too low","howToFix":"Darken the foreground","count":1}]},
      {"id":"performance","title":"Performance","score":88,"grade":"B","passedCount":4,"issues":[]}
    ]
  }'

Weights: site-stability 25, wcag 25, site-validator 20, performance 20, computer-use 10.

Normalized over only the checks you send — missing checks don't cost you points. The response includes a recordId for signed-in users, viewable in the Console.

Site Tone (synchronous)

POST /api/agent/site-tone returns in one request — no polling:

curl -s -X POST https://dev.solokit.run/api/agent/site-tone \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","siteType":"developer-tool","locale":"en"}'
  • siteType: developer-tool, database, saas, research, finance, content, other
  • keepAccent: optional brand color to preserve
  • Returns seven dimension scores, overallScore, three strategies, cursorPrompt, and commentary

Wiring into CI

The CLI exit code reflects whether the checks ran, not a score threshold:

  • 0: every requested check returned a report
  • 1: at least one check failed
  • 2: bad arguments (invalid URL, unknown check name)

To gate on score, call the API and read the structure yourself (check has no JSON output; only e2e has --json):

TASK=$(curl -s -X POST https://dev.solokit.run/api/sandbox/dispatch \
  -H "Content-Type: application/json" -H "Authorization: Bearer $DEVASSIST_KEY" \
  -d "{\"type\":\"wcag\",\"url\":\"$PREVIEW_URL\"}" \
  | python3 -c 'import sys,json;print(json.load(sys.stdin)["taskId"])')

sleep 20

SCORE=$(curl -s "https://dev.solokit.run/api/sandbox/tasks/$TASK" \
  | python3 -c 'import sys,json;r=json.load(sys.stdin);print(r.get("result",{}).get("report",{}).get("score") or 0)')

echo "score=$SCORE"
[ "$SCORE" -ge 85 ] || exit 1

Drop it into a post-deploy hook on Vercel or GitHub Actions. Posting a report in the PR beats making reviewers squint at screenshots.

Rate limits and errors

StatuscodeMeaningWhat to do
400—Bad arguments (URL scheme, missing field)Fix the request; don't retry
401—Key invalid or revokedIssue a new key
429RATE_LIMITEDToo many requests in a short windowBack off per Retry-After
429QUOTA_EXCEEDEDDaily distinct-URL quota exhaustedWait for the next day, or upgrade
  • Only public http: / https: addresses are accepted. localhost, private IPs, and intranet hostnames are rejected outright.
  • Both 429s carry a code to tell them apart: RATE_LIMITED is per-second throttling, QUOTA_EXCEEDED is the daily cap (Retry-After is 86400). Honor Retry-After; don't retry immediately.

Next