API Gateway
Run node {baseDir}/api-gateway.js. Send only user-approved endpoints and data. The caller must ensure prompt data and request bodies are appropriate for the named provider. The gateway does not follow redirects. Bearer credentials require HTTPS on the default port and an exact configured hostname. Configure replacement hosts explicitly if upgrading from a wildcard allowlist.
--keys add <provider> --stdin --allow-domain <hostname>: pipe a credential from an approved source. Repeat--allow-domainto add exact hostnames. A matching<PROVIDER>_API_KEYenvironment variable takes precedence over a saved value.--keys,--keys remove <provider>: list or remove a configured provider. Approve removal first.--call <provider> <https-url> [json] [--dry-run]: POST to the endpoint or inspect the destination and credential policy without sending.--cache,--log,--status,--rate <provider>,--circuit: inspect gateway state.--cache-full <provider>: explicitly enable storage of complete response bodies for that provider. They may contain sensitive data; entries expire after five minutes of reuse eligibility.--cache --clearremoves stored cache data, and--log --clearclears request logs.--fallback <provider> <alternate>: configure a fallback. The alternate must independently approve the same destination.
Keys stored on disk are plaintext. The store defaults to memory/api-gateway; use an owner-only workspace, including a restrictive ACL on Windows. Request logs hold provider, status class, time, and attempt. Metadata is cached by default; only opted-in complete responses can serve cache hits. API_GATEWAY_ALLOW_HTTP=1 is restricted to unauthenticated requests.
Version 1.1.13 blocks credentialed plaintext requests, scopes cache entries to endpoint and credential, uses private atomic state files, and replaces key values in command arguments with stdin.
