Connector API
Errors
Errors are JSON { "code", "detail"? } with a matching HTTP status.
HTTP errors
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | Missing credential |
| 401 | INVALID_API_KEY | Unknown or deleted key |
| 401 | INVALID_TOKEN | OAuth access token expired, revoked, or bound to another resource |
| 403 | INSUFFICIENT_SCOPE | The token’s scopes do not cover this endpoint — detail.scope names the one needed |
| 403 | FORBIDDEN | A token bound to other skills tried to act on this one |
| 403 | SESSION_CREDENTIAL_REQUIRED | A runtime callback was called with a credential that belongs to no session |
| 404 | SKILL_NOT_FOUND | Unknown skill, or not yours |
| 404 | SESSION_NOT_FOUND | Unknown session, or not yours |
| 400 | INVALID_JSON | Request body is not valid JSON |
| 400 | INVALID_REQUEST | Malformed request body, or a query parameter that is unknown or out of range |
| 400 | INVALID_SOURCE_URL | Searching skills: the source_url filter is not a GitHub repository URL |
| 400 | INVALID_SOURCE_URL | Matching public skills: a source filter is not a GitHub repository or skill URL |
| 400 | INVALID_MODEL | The hosted_model_id (or a platform-mode generation / understanding capability’s model) is not a model the platform serves — a typo or a retired id; detail.model_id names it; a floating alias the catalog places no build behind counts too. On import, nothing was created. Checked against the platform’s model catalog on every platform-served model write; if the catalog cannot be read the id is accepted, and a model that cannot run surfaces as MODEL_UNRESOLVED when a session starts |
| 409 | SKILL_BUILTIN | A built-in skill cannot be deleted |
| 409 | NOT_SHAREABLE | Activate before serving config is set |
| 403 | GITHUB_NOT_CONNECTED | This account has not installed the Socialistic GitHub App — connect it once in the Creator Console, then retry (or upload an archive instead) |
| 403 | GITHUB_REPO_NOT_ACCESSIBLE | The repo is outside every installation this account connected |
| 422 | INVALID_GITHUB_URL | The github_url is not a GitHub repository URL — another host, no owner/repo path, or credentials embedded in it |
| 422 | REPO_UNREACHABLE | Cannot read the GitHub repo — wrong URL, or private and the App is not installed on it |
| 422 | PACK_TOO_LARGE | The repository is larger than the import will package — import a subtree (/tree/<branch>/<path>) instead of the whole repo |
| 502 | UPSTREAM_ERROR | The repo was readable but packaging it did not finish — nothing was created, retry |
| 502 | MCP_UNAVAILABLE | Creating a session: one of the skill’s MCP servers could not be reached or would not list its tools, so no session was created. It is the skill’s server, not your request — retry later, or tell the skill’s creator |
| 429 | RATE_LIMITED | Per-key rate limit exceeded |
| 429 | IMPORT_RATE_LIMITED | POST /v1/skills/github-import: this caller created its hourly allowance of new skills — a link that is already listed still answers |
| 429 | GITHUB_RATE_LIMITED | GitHub’s own quota is exhausted — retry after a short wait |
| 404 | CAPABILITY_NOT_FOUND | No capability with that id on the skill’s draft |
| 400 | INVALID_CAPABILITY_CONFIG | The capability’s config was refused — detail.fieldErrors names the fields. Besides its schema: a generation / understanding capability accepts platform or relay (with api_key), never account; moving a relay endpoint to another origin requires its new key; and an account-mode inference model needs an active connection of yours for that provider |
| 422 | CAPABILITY_TYPE_NOT_ATTACHABLE | The capability type is still under development |
| 409 | BILLING_SINGLETON / INFERENCE_SINGLETON | Every skill has exactly one of each — update it instead of attaching a second one or detaching it |
| 409 | TRAFFIC_SINGLETON | The skill already has its public-page copy — update it instead |
| 409 | REVISION_LEGACY_FORMAT | The skill predates the capability model — its capabilities cannot be edited or its draft published; re-import it |
| 409 | CAPABILITY_SET_INVALID | Publish: the draft’s capabilities break a rule the set must keep — detail names the rules; GET /draft/capabilities shows them as validation.violations |
| 409 | SOURCE_CAPABILITY_REQUIRED | Publish: the skill is the canonical skill for a GitHub path, and every version it publishes must keep a code capability pointing at that path — attach one for the path, then publish |
| 409 | SOURCE_CAPABILITY_LOCKED | A draft write would detach a canonical skill’s source capability or point it at another repository or subpath — changing its ref is allowed |
| 501 | NOT_IMPLEMENTED | POST /v1/public/skills/search is reserved and not available yet — use POST /v1/public/skills/match |
| 409 | REVISION_NOT_DRAFT | The draft was published while this write was in flight — retry, and it lands on a new draft |
| 409 | REVISION_CONFLICT | A concurrent update changed the draft while a platform-model check was in flight — re-read the draft and retry |
| 400 | CODE_FILES_READ_ONLY | Tried to write files on a repository-backed package — edit the repo and re-resolve its ref instead |
| 503 | PRICING_UNAVAILABLE | The model price list could not be read — retry shortly. Distinct from OWN_CHARGE_PRICE_REQUIRED, which means the model has no price at all |
| 503 / 422 | MODEL_UNRESOLVED | The skill's platform-served model is a floating alias (~vendor/family-latest) that could not be pinned to a concrete build for this session. 503 when the model catalog could not be read — retry shortly; 422 when the catalog places no build behind the alias — the skill's model needs changing |
| 500 | INTERNAL_ERROR | Unexpected server-side failure |
OAuth token endpoint
POST https://socialistic.ai/oauth/tokenanswers in the OAuth 2.0 shape (RFC 6749 §5.2) so stock client libraries can read it: { "error" } instead of { "code" }.
| Status | Error | Meaning |
|---|---|---|
| 400 | invalid_request | A required parameter is missing, malformed or repeated, or the body is over 16 KiB |
| 400 | unsupported_grant_type | grant_type is neither authorization_code nor refresh_token |
| 400 | invalid_grant | The code is unknown, expired, already used, or was issued to another client, redirect_uri or PKCE challenge; or the refresh token is unknown, expired, revoked or already rotated (which revokes the authorization) |
| 400 | invalid_target | resource is not one this server issues tokens for, or not the one the code was issued for |
| 400 | invalid_scope | A refresh asked for a scope the authorization does not hold |
Toscana protocol
The /v1/toscana endpoints add these to the shared codes above.
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_TOKEN | The JWT isn’t HS256, its signature doesn’t match the key its iss names, it has expired or was minted to live longer than allowed — or it is a session JWT sent to an endpoint that only takes service credentials |
| 400 | UNSUPPORTED_FIELD | A Gateway field Socialistic can’t honor was set: config or ephemeral on createSession, stream, turnEnv or maxCostUsd on send_message. detail names it |
| 4xx | GATEWAY_REJECTED | Toscana refused a relayed host tool call, with its own status. On submit_tool_result, 412 means the call is no longer pending — the outcome is lost; don’t retry |
| 404 | RUN_NOT_FOUND | No such run, or not one of yours on this skill |
| 409 | TOSCANA_RUNTIME_UNAVAILABLE | createSession: the skill’s new sessions are routed to the legacy runtime, which this protocol can’t serve. Nothing was created |
Runtime callback
The agent-side publish callback authorizes with a session’s OAuth access token rather than an API key, so it answers with its own set on top of the shared codes above.
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | No Authorization: Bearer header |
| 401 | INVALID_TOKEN | The token is expired or revoked (each turn’s token replaces the last) |
| 403 | INSUFFICIENT_SCOPE | The token does not carry skill:create |
| 403 | SESSION_CREDENTIAL_REQUIRED | The credential belongs to no session (an API key or an app’s token) |
| 403 | FORBIDDEN | The token’s session belongs to another account |
| 403 | SESSION_ALREADY_IMPORTED | This session already completed an import; the credential is one-shot |
| 404 | SESSION_NOT_FOUND | The credential’s session no longer exists |
| 400 | INVALID_JSON | JSON form: body is not JSON |
| 400 | INVALID_REQUEST | JSON form: body failed schema validation |
| 400 | INVALID_ARCHIVE | Archive is empty, not valid base64, or the upload ended mid-stream |
| 413 | ARCHIVE_TOO_LARGE | Request body over the import ceiling |
| 422 | SKILL_CANNOT_PARSED | No usable SKILL.md at the archive root |
| 422 | SKILL_MD_INVALID | SKILL.md parsed but is not a valid skill |
| 422 | SKILL_MD_MISSING_FRONTMATTER | SKILL.md has no YAML frontmatter |
| 422 | UNSAFE_ENTRY | Archive contains a path that escapes its root |
| 422 | UPLOAD_TOO_LARGE | Archive is within the request ceiling but over the packager’s limit |
| 422 | INVALID_ARCHIVE | Bytes are not a readable archive (as a 400 above, the body itself never arrived) |
| 422 | ARCHIVE_BINARY_UNSUPPORTED | The archive carries non-text files. A skill’s files are delivered as text, so import the project as a code repository instead, or remove them. Editor/OS noise (.DS_Store, __MACOSX/) is ignored, not refused |
Sending a message
POST …/runs answers a run that could not start with its own codes, on top of the shared ones above. Apart from UPSTREAM_ERROR, nothing started and nothing was charged.
| Status | Code | Meaning |
|---|---|---|
| 409 | RUN_PENDING | The session is still busy with a previous run — retry once it finishes. detail.pending_run_id names that run when known, so a caller whose own send timed out can poll it |
| 409 | PRIOR_RUN_UNSETTLED | A run is held because one of your earlier runs (in any session) has ended but its usage is not reported yet — retry in a few minutes, once it settles |
| 409 | SESSION_READ_ONLY | The session ran on a retired runtime and can no longer be continued — create a new session; its history stays readable |
| 422 | WALLET_COLD | Your wallet is too low to start a run |
| 429 | WALLET_HELD | Your wallet balance is held by parallel sessions — wait for one to finish, then retry |
| 503 | GITHUB_SKILL_SEARCH_DISABLED | (GitHub skill search) Not offered on this deployment — nothing was created |
| 422 | SKILL_NOT_CONFIGURED / LLM_CONFIG_ERROR | The skill’s serving configuration is incomplete or invalid |
| 422 | OWN_CHARGE_PRICE_REQUIRED | The skill’s model has no published price to charge by |
| 422 | IDEMPOTENCY_KEY_REUSED | (GitHub skill search) This Idempotency-Key was already used for a different task — nothing was started; use a new key |
| 429 | QUEUE_FULL | (busy_policy: "enqueue") The session already holds as many waiting runs as it can — retry once one has started |
| 409 | RUN_NOT_STEERABLE | (steer) The run is not executing — queued, starting or finished. Nothing is redirected to another run; send a message instead |
| 409 | IDEMPOTENCY_IN_PROGRESS | (GitHub skill search) An earlier start under the same Idempotency-Key is still being created — retry shortly to get its session and run back |
| 409 | STEER_UNCONFIRMED | (steer) An earlier attempt under the same Idempotency-Key may have arrived — do not resend |
| 501 | STEER_UNSUPPORTED | (steer) The runtime serving the session cannot steer yet — send a message instead |
| 413 | ATTACHMENT_TOO_LARGE | An attachment exceeds the maximum request size |
| 502 | ATTACHMENT_STAGING_FAILED | An attached file could not be staged for the agent — re-upload and retry |
| 502 | UPSTREAM_ERROR | The agent runtime did not confirm the run. It may still have started — retry with the same Idempotency-Key to get that run back rather than start another |
| 404 | RUN_NOT_FOUND | (run status, steer) No such run in this session. Cancel never answers this — cancelling an unknown or finished run is a no-op |
SSE error_code values
Codes carried by a run.failed frame, including the ones below. The full set is the RunErrorCode enum in the published contracts, and it can grow: treat a code you do not recognize as UNKNOWN.
| Code | Meaning |
|---|---|
KEY_INVALID | API key not recognized |
KEY_EXPIRED | API key expired or revoked |
RATE_LIMIT | Upstream rate limit or quota exceeded |
PROVIDER_CREDITS_EXHAUSTED | Upstream provider credits depleted |
PROVIDER_ERROR | Upstream provider returned 4xx/5xx |
MODEL_IMAGE_UNSUPPORTED | An image was attached but the model is text-only |
STREAM_TIMEOUT | The stream from the agent went silent and could not be restored — read the run status or session history for what was saved |
GATEWAY_TIMEOUT | The agent runtime was unreachable or at capacity — retry later |
ATTACHMENT_STAGING_FAILED | An attached file could not be staged for the agent — re-upload and retry |
RUN_PENDING | The session was still busy with a previous run (HTTP 409 on POST /runs) — retry once it finishes |
PRIOR_RUN_UNSETTLED | One of your earlier runs had not finished settling, so a new run could not start (HTTP 409 on POST /runs) — retry in a few minutes |
SESSION_READ_ONLY | The session ran on a retired runtime and can no longer be continued (HTTP 409 on POST /runs) — create a new session; its history stays readable |
QUEUE_EXPIRED | A queued run waited too long (30 minutes) behind the session’s work and never started |
CANCELLED | The run was cancelled |
GOOSE_ERROR | Agent runtime error (setup, tool timeout, internal) |
UNKNOWN | Could not classify the failure |
SSE error_stage values
WHERE in the request chain the failure surfaced, orthogonal to error_code (WHAT kind of failure):
| Stage | Meaning |
|---|---|
agent | Goose agent runtime error (tool failure, setup, etc.) |
gateway | Serving layer rejected the request (auth, billing, config) |
provider | Upstream model provider returned an error |
network | Couldn’t reach the agent or the stream dropped |
unknown | Could not determine |