Test checks
Start a local test check's model questions
POST /api/v1/tests/checks
Starts a local test check's model questions. Requires sign-in and model_api. Send a random check_id, protocol_version v1, cli_version, an Idempotency-Key and optionally the repository's workspace; omit workspace for your own. You must belong to the workspace. Starting counts one check against that workspace. Free allows 100 checks per UTC month across your Free workspaces and verified addresses sharing an inbox; other plans have no cap. Exact retries replay for 24 hours without counting again. A configured model is required. A frozen organization refuses new checks.
Parameters
Idempotency-Keyheader · required · stringRequired for model checks and questions. Reuse the exact body and IDs on retries. Keys are scoped to the caller's namespace and retained as hashes after the 24-hour replay window. Expired identities return model_replay_expired and cannot count again.
Minimum length:
1· Maximum length:255
Example request
curl --request POST 'https://commitscale.com/api/v1/tests/checks' \
--header "Authorization: Bearer $CSCALE_CHECK_KEY" \
--header 'Idempotency-Key: 019a1f40-7c00-7000-8000-000000000003' \
--header 'Content-Type: application/json' \
--data '{
"check_id": "019a1f40-7c00-7000-8000-000000000001",
"cli_version": "0.1.0",
"protocol_version": "v1"
}'Example values illustrate the format. Use your own credentials and identifiers.
Request body
application/json
Register one check against a workspace. Exact retries retain the same body.
check_idrequired · string (uuid)Random UUID, reused for retries and focused reruns of the same plan.
cli_versionrequired · stringVersion of the calling CLI, such as 0.1.0.
protocol_versionrequired · stringWire protocol version. Send v1.
workspaceoptional · stringWorkspace containing the repository. Omit for your personal workspace.
Responses
201 Check started, or its original answer replayed.
application/json
{
"check_id": "019a1f40-7c00-7000-8000-000000000001",
"protocol_version": "v1"
}check_idrequired · string (uuid)Random UUID for this check, reused for exact retries.
protocol_versionrequired · stringWire protocol version. Send v1.
RateLimit and RateLimit-Policy describe the request rate. Follow Retry-After when a response asks you to wait.
Problem responses
Errors use application/problem+json. Act on the stable code, and follow next when present. See the problem format.
organization_frozen403The organization's Free plan has more than one person; members cannot write, nobody can promote an owner, and no check can start.
An owner can renew Pro or remove people until one remains; others can ask an owner.
model_check_cap_reached403The Free allowance of 100 checks this UTC calendar month is used across Free workspaces. Verified addresses that reach one inbox share the allowance. The check was not started.
Do not retry automatically. Open next.url to upgrade the workspace to Pro and keep checking. Already started checks may finish.
model_unavailable503The local check's model is not configured or could not return both answer probabilities.
Leave the question unanswered. Retry the exact body with the same check ID, request ID and idempotency key within the remaining check budget.
excerpt_too_large413A model request exceeds a field, line, rendered byte, token, body or internal per-check question bound.
Skip the question and leave it unanswered. Do not shorten a diff, split its meaning across questions or retry the same oversized input.
model_replay_expired410A model check's 24-hour replay window expired. Its retained identities cannot be charged again.
Leave this question unanswered. Never silently substitute a fresh check for an expired retry.
check_key_scope403A check-only key may call the test check, read its own usage and acceptance rule, contact support, and withdraw data sharing.
Use a person's sign-in for account management. More agent power needs the owner's passkey; this key cannot widen itself.
feature_off403The namespace plan does not include this feature.
Retrying on the same plan will not help. GET /api/v1/namespaces/{namespace}/plan, and the namespace's Plan page in Settings, show what its plan includes.
unauthenticated401The request carried no credentials.
Use this operation's sign-in method. Bearer credentials use
Authorization: Bearer <token>; browser credentials use the session cookie.invalid_token401The token is unknown, expired, or revoked, its agent was revoked, or an OAuth token was used outside its MCP resource.
Stop using it. Sign in again, or ask the owner to create a replacement agent key.
forbidden403The caller may not do this: only people may, only owners may, or the agent was not given this repository or write access.
Stop. Retrying will not help. Ask the owner for the access, or leave the step to a person.
not_found404It does not exist, or the caller cannot read it: a repository the caller cannot read is reported as not found.
Check the name or ID, and that the token has the repository.
invalid_request400 / 413 / 422The request is malformed or breaks a rule, such as a title that is too long, or a body that is not the expected JSON.
Fix the request as
detailsays. The same request fails the same way.quota_exceeded429With 429, the caller used its requests for the minute. With 422, a count limit was reached.
With 429, wait
Retry-Afterseconds and retry. With 422, remove one first.idempotency_key_reused409 / 422The idempotency key was already used for a different request.
Use a new key for each new request, and the same key only for a retry of the same request.
idempotency_key_in_use409The first request with this key is still running, including a queued model question, or it succeeded with a secret, such as a new token, which is never replayed.
When
Retry-Afteris set, retry then with the same key. Otherwise the first request succeeded: do not repeat it.internal500The server failed, and logged why.
Retry after
Retry-Afterseconds. A write is safe to retry with the same idempotency key.unavailable503With 502, a service the server needs did not answer, such as a sign-in provider. With 503, the server is busy, such as when a workspace is locked or host lookups are full, or a write with an idempotency key runs long: that write goes on, and its answer is kept for the key.
With 502, retry later, or sign in another way. With 503, retry after
Retry-Afterseconds, using the same idempotency key for a write; a long-running write can then replay its answer.