Installation
Environment variables
The SDK reads connection settings from environment variables by default.Config
Config holds the credentials and endpoint used by every API call. The SDK builds it automatically from environment variables — you rarely need to construct one directly. Use NewConfig() with functional options when you need explicit control.
string
default:"$DECLAW_API_KEY"
API key sent as the
Authorization: Bearer header on every request. Defaults
to the DECLAW_API_KEY environment variable.string
default:"$DECLAW_DOMAIN or api.declaw.ai"
Hostname of the Declaw API server. Defaults to the
DECLAW_DOMAIN
environment variable, falling back to api.declaw.ai.int
default:"443"
API server port. HTTPS for 443, HTTP for 80.
string
default:"$DECLAW_API_URL"
Full URL override (e.g.
http://localhost:8080). When set, Domain and
Port are not used to construct the URL.time.Duration
default:"0 (no timeout)"
Default per-request timeout applied to all HTTP calls made with this config.
ConfigOption functions
Quick example
What’s exported
The top-leveldeclaw package exports all public types and functions: