The /api/agent/models/ namespace exposes the agent’s catalogue of bindable models and LLM providers, plus the credential management surface for those providers. Use these endpoints to discover what models are available, inspect provider capabilities, store API keys, drive interactive OAuth logins, and manage a pooled OAuth account roster per provider.
All endpoints in this namespace are stateless reads/writes against the on-disk .hoody install and the merged providers catalogue. They have no session dimension; a per-request X-Hoody-Cwd or X-Hoody-Config-Dir header is honored where the route resolves a cwd.
Lists the merged model catalogue: every catalogued provider model (spec, display name, context window, output limit, reasoning flag, display prices) AND every selectable fusion composite (spec = fusion/<slug>, with its method and member specs). Each entry carries source:"provider" or source:"fusion" so a caller can tell them apart. A composite’s context_window is the minimum across its catalogued members and it carries no per-token price. Only selectable composites appear; a broken composite is excluded.
This endpoint takes no request body.
Name In Type Required Description pagequery integer No 1-based page number for pagination. limitquery integer No Maximum items per page (0 = no pagination). X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id. realmquery string No Query alias of the X-Hoody-Realm header.
"spec" : " anthropic/claude-opus-4-8 " ,
"display_name" : " Claude Opus 4.8 " ,
"context_window" : 200000 ,
"spec" : " fusion/balanced-default " ,
" anthropic/claude-sonnet-4-6 " ,
"code" : " realm_scope_unsupported " ,
"message" : " realm scope not supported on this route "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy; the source IP is private or local. Reach the agent through hoody-proxy (e.g. hoody agent …), not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request (too busy, or a per-client stream concurrency cap was hit). Honor Retry-After and retry.
const page = await client . agent . models . listModelsIterator ( { page: 1 , limit: 50 } );
for await ( const model of page) {
console . log (model . spec , model . source );
Returns one catalogued model by its full spec (e.g. anthropic/claude-opus-4-8), OR a fusion composite by its fusion/<slug> spec. The spec itself contains a slash; pass it URL-encoded or as the trailing path segment.
This endpoint takes no request body.
Name In Type Required Description specpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"spec" : " anthropic/claude-opus-4-8 " ,
"display_name" : " Claude Opus 4.8 " ,
"context_window" : 200000 ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const model = await client . agent . models . getModel ( { spec: " anthropic/claude-opus-4-8 " } );
Lists every catalogued LLM provider (id, display name, model prefix, wire format, model count) from the merged providers.json catalogue. The catalogue is process-wide with no realm dimension, so a per-request realm header returns 400 realm_scope_unsupported.
This endpoint takes no request body.
Name In Type Required Description pagequery integer No 1-based page number for pagination. limitquery integer No Maximum items per page (0 = no pagination). X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"display_name" : " Anthropic " ,
"model_prefix" : " anthropic/ " ,
"wire_format" : " anthropic-messages " ,
"display_name" : " OpenAI " ,
"model_prefix" : " openai/ " ,
"wire_format" : " openai-chat " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const page = await client . agent . models . listProvidersIterator ( { limit: 50 } );
for await ( const provider of page) {
console . log (provider . id , provider . display_name );
Returns one provider’s metadata plus its full catalogued model list.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"display_name" : " Anthropic " ,
"model_prefix" : " anthropic/ " ,
"wire_format" : " anthropic-messages " ,
"spec" : " anthropic/claude-opus-4-8 " ,
"display_name" : " Claude Opus 4.8 " ,
"context_window" : 200000 ,
"spec" : " anthropic/claude-sonnet-4-6 " ,
"display_name" : " Claude Sonnet 4.6 " ,
"context_window" : 200000 ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const provider = await client . agent . models . getProvider ( { id: " anthropic " } );
Reports a provider’s stored-credential state: whether an API key or OAuth login is stored, the effective default method, the passwordless flag, and the secret-free OAuth account pool. Any stored API key is surfaced as a 10-character prefix only.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"provider_id" : " anthropic " ,
"api_key_prefix" : " sk-ant-api " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const status = await client . agent . models . getProviderAuth ( { id: " anthropic " } );
These endpoints manage the per-provider OAuth account pool (a list of default and named OAuth logins that the agent can rotate through).
Lists the secret-free OAuth account pool for a provider: key, label, active flag, cooldown — never a token. Returns 422 oauth_unsupported when the provider has no OAuth flow.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. pagequery integer No 1-based page number for pagination. limitquery integer No Maximum items per page (0 = no pagination). X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"cooldown" : " 2025-11-10T12:00:00Z "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow, so an OAuth start/poll/submit/logout or a default=oauth promotion cannot be honored. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
const page = await client . agent . models . listProviderAccountsIterator ( { id: " anthropic " } );
Begins an OAuth login that adds to the provider’s account pool. Returns a job_id; drive it with the same poll and submit endpoints used by startProviderOAuth. Returns 422 oauth_unsupported when the provider has no OAuth flow.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
This endpoint accepts an empty JSON object as its body. No fields are required.
"job_id" : " oj_3f2c1a0b9d4e " ,
"verification_uri" : " https://auth.example.com/activate " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " no such OAuth job (it may have expired) "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier. job_not_foundJob not found The referenced OAuth login job does not exist or has expired. Restart the flow with POST /providers/{id}/auth/oauth and drive the new job id.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap (MaxBodyBytes). Reduce the request body below the configured limit (default 8 MiB).
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const job = await client . agent . models . addProviderAccount ( { id: " anthropic " } );
Makes one pooled OAuth account active for a provider. The key path value names the account; the trailing /active sub-resource names the activation verb. Returns the resulting secret-free account pool. Returns 422 oauth_unsupported when the provider has no OAuth flow.
Name In Type Required Description idpath string Yes Path identifier. keypath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
This endpoint accepts an empty JSON object as its body. No fields are required; the account is identified by the {key} path value.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . setProviderAccountActive ({ id: " anthropic " , key: " work " });
Drops one pooled OAuth account for a provider. The key path value names the account. Returns the resulting secret-free account pool. Returns 422 oauth_unsupported when the provider has no OAuth flow.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. keypath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . removeProviderAccount ({ id: " anthropic " , key: " work " });
These endpoints drive an interactive OAuth login against a provider. The flow is: start → poll (and optionally submit a manual code) → terminal state. The job id carries only the non-secret verification URL and user code; no token is ever returned.
Begins an interactive OAuth login for a provider. Returns {success, job_id, verification_uri, user_code?}. Drive the flow with GET .../oauth/{job} (poll) and, for a manual/PKCE code, POST .../oauth/{job}/code (submit). Returns 422 oauth_unsupported when the provider has no OAuth flow.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
Name Type Required Description add_accountboolean No When true, the login adds to the provider’s OAuth account pool (LoginAddAccount) instead of replacing the primary login.
"job_id" : " oj_8a7b6c5d4e3f " ,
"verification_uri" : " https://auth.example.com/activate " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " no such OAuth job (it may have expired) "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier. job_not_foundJob not found The referenced OAuth login job does not exist or has expired. Restart the flow with POST /providers/{id}/auth/oauth and drive the new job id.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const job = await client . agent . models . startProviderOAuth ( { id: " anthropic " } );
Polls an in-flight OAuth login job. Reports state:"pending" until the user authorizes, then state:"complete" (with the now-current secret-free auth status) or state:"error" (with a scrubbed error message).
Caution
A failed login is reported under the 200 body’s state:"error", NOT as an HTTP error. Inspect the state field (pending | complete | error), never the HTTP status, to decide success.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. jobpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"verification_uri" : " https://auth.example.com/activate " ,
"user_code" : " WXYZ-9876 " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " no such OAuth job (it may have expired) "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier. job_not_foundJob not found The referenced OAuth login job does not exist or has expired. Restart the flow with POST /providers/{id}/auth/oauth and drive the new job id.
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const poll = await client . agent . models . pollProviderOAuth ( { id: " anthropic " , job: " oj_8a7b6c5d4e3f " } );
if (poll . state === " complete " ) { /* authorized */ }
Supplies the authorization code (or full redirect URL) a blocked OAuth flow is waiting for — the explicit code-exchange step for manual-paste / PKCE flows. A second submit on an already-fed job is a no-op (submitted: false). Returns 404 job_not_found when the job is unknown or expired.
Name In Type Required Description idpath string Yes Path identifier. jobpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
Name Type Required Description codestring Yes The authorization code (or the full redirect URL) to complete the exchange.
"message" : " code accepted; flow is completing "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " no such OAuth job (it may have expired) "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier. job_not_foundJob not found The referenced OAuth login job does not exist or has expired. Restart the flow with POST /providers/{id}/auth/oauth and drive the new job id.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . submitProviderOAuthCode ({
data: { code: " splx-auth-code-12345 " }
Removes a provider’s stored OAuth credentials. Idempotent. Returns the resulting secret-free auth status. Returns 422 oauth_unsupported when the provider has no OAuth flow.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"provider_id" : " anthropic " ,
"api_key_prefix" : " sk-ant-api " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier. job_not_foundJob not found The referenced OAuth login job does not exist or has expired. Restart the flow with POST /providers/{id}/auth/oauth and drive the new job id.
"code" : " oauth_unsupported " ,
"message" : " provider does not support OAuth login "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . logoutProviderOAuth ({ id: " anthropic " });
These endpoints store, set, and remove a provider’s API key in the 0600-atomic ~/.hoody/.env keychainless store. The reply never returns the key — it echoes only a secret-free auth status (10-character prefix).
Stores a provider’s API key. The key is written 0600-atomic and is never returned; the reply carries only the secret-free auth status (10-char prefix). Returns 422 auth_method_unsupported for a passwordless provider.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
Name Type Required Description api_keystring Yes The provider API key. Stored in the 0600 ~/.hoody/.env store; the reply echoes only a prefix.
"provider_id" : " anthropic " ,
"api_key_prefix" : " sk-ant-api " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"code" : " auth_method_unsupported " ,
"message" : " provider is passwordless (no API key method) "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth. auth_method_unsupportedAuth method unsupported The requested credential method is not available for this provider (e.g. an API-key default on a passwordless provider). Pick a method the provider supports; a passwordless provider needs no default. credential_not_storedCredential not stored The default method cannot be promoted because no credential of that kind is stored for the provider yet. Store the credential first, then set the default.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . setProviderAPIKey ({
data: { api_key: " sk-ant-api03-... " }
Removes a provider’s stored API key and its default-method marker. Idempotent. Returns the resulting secret-free auth status.
This endpoint takes no request body.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
"provider_id" : " anthropic " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " auth_method_unsupported " ,
"message" : " provider is passwordless (no API key method) "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth. auth_method_unsupportedAuth method unsupported The requested credential method is not available for this provider. Pick a method the provider supports; a passwordless provider needs no default. credential_not_storedCredential not stored The default method cannot be promoted because no credential of that kind is stored for the provider yet. Store the credential first, then set the default.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . deleteProviderAPIKey ({ id: " anthropic " });
Sets the effective default credential method for a provider: api_key or oauth. The daemon validates the method against the provider’s capabilities and that a credential of that kind is actually stored, otherwise returns 422.
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope. X-Hoody-Config-Dirheader string No Per-request --config-dir override. X-Hoody-Containerheader string No Per-request bound remote container. X-Hoody-Realmheader string No Per-request realm selector. realmquery string No Query alias of the X-Hoody-Realm header.
Name Type Required Description defaultstring Yes The default method: api_key or oauth. Must be a method the provider supports AND has a stored credential for.
"provider_id" : " anthropic " ,
"api_key_prefix" : " sk-ant-api " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to a no-realm RPC. Omit the realm header on this route.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution admin_unauthorizedRejected by the daemon’s own admin gate The daemon’s Unix-socket admin gate refused the request. Run the daemon with socket auth and no separate admin capability so its own gate allows HTTP requests forwarded from the gateway. forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"code" : " credential_not_stored " ,
"message" : " no API key is stored for this provider "
Error Code Title Description Resolution oauth_unsupportedOAuth not supported The provider has no OAuth login flow. Use an API key for this provider, or pick a provider that supports OAuth. auth_method_unsupportedAuth method unsupported The requested credential method is not available for this provider. Pick a method the provider supports; a passwordless provider needs no default. credential_not_storedCredential not stored The default method cannot be promoted because no credential of that kind is stored for the provider yet. Store the credential first (PUT /providers/{id}/auth/api-key, or complete POST /providers/{id}/auth/oauth), then set the default.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . models . setProviderDefault ({
data: { default: " api_key " }