Docs
Sign in

Test a connection: a free account check, or one model turn.

OpenCode's free models pass the account check when a machine runs OpenCode and lists at least one free model; a machine's OpenCode sign-in, when that machine reports OpenCode signed in.

POST/api/v1/provider-connections/{id}/tests

Scopeconfig

Neither check spends anything; until a machine says so the stage is deferred. A turn on someone's own OpenCode sign-in is theirs alone to ask for (403 not_allowed), and runs only on its machine. The timeline records the key ID, action and outcome.

Path parameters.

idstringrequired

The provider connection's id.

Headers.

Idempotency-Keystring

Retry the same request with the same key. Retry rules.

Body.

stageenumrequired

account checks the credential with its provider for free (the model list, Boat's account, GitHub's /user); a machine or plan sign-in answers it deferred. turn also runs one paid model turn of pick on a machine that can run it.

pickobject

One role's explicit choice: which named connection, which harness, which model, which options.

ShowHide 4 fields

connectionIdstringrequired

The connection this role's agents use, by id (GET /connections). Named every time: the server never picks one. At least 5 characters.

harnessenumrequired

The coding agent program that runs the model. A machine runs it only when that harness is installed there. One of claude-code, pi, codex, opencode.

modelstringrequired

The model this role's agents use, as the connection's provider names it. 1 to 200 characters.

optionsobject

The model's options for this role. Default {}.

ShowHide 1 field

effortenum

How much reasoning the model spends, where its harness lets you choose. Left out, the harness's default. One of low, medium, high, xhigh, max.

nodeIdstring

The machine to run the turn on. An offline machine makes the turn deferred; a cloud worker is never started for a test. At least 5 characters.

Response.

202 Accepted · JSON object. Follow progress on the timeline.

422 validation_failed
Each schema error appears in details.