本文へ移動
メイン ドキュメント
ドキュメント

Quickstart

Sign in, verify with a card, issue a token, send the first request. About five minutes.

1. Sign in and issue a token

Shell
# 1. Sign in at https://kotoba.cloud/account
# 2. 「CLI / IDE から使う」→「接続トークンを発行」(shown once)
export KOTOBA_API_TOKEN="kc_pat_<your-token>"

2. First job (async)

Shell
curl -s -X POST https://api.kotoba.cloud/v1/research/jobs \
  -H "Authorization: Bearer $KOTOBA_API_TOKEN" \
  -H "content-type: application/json" \
  -H "idempotency-key: 11111111-1111-4111-8111-111111111111" \
  -d '{"model":"qwen3.8-flash-next-whitehacker","task":"code-review","scopeId":"owned",
        "max_tokens":256,"messages":[{"role":"user",
        "content":"Review this login function for auth bypasses."}]}'

# poll until status is succeeded (queued/running -> 202)
curl -s "https://api.kotoba.cloud/v1/research/job?jobId=<uuid>" \
  -H "Authorization: Bearer $KOTOBA_API_TOKEN"

3. Or the sync call (OpenAI-compatible)

Shell
curl -s -X POST https://api.kotoba.cloud/v1/chat/completions \
  -H "Authorization: Bearer $KOTOBA_API_TOKEN" \
  -H "content-type: application/json" \
  -d '{"model":"qwen3.8-flash-next-whitehacker",
        "messages":[{"role":"user","content":"Reply with exactly: OK"}]}'

Verification and an approved scope are required before the first call. An unverified principal receives 403 (verification-required / research-scope-required).