invoke command is the primary way to make authenticated API calls through aivault. The broker validates the request, injects auth, and returns the response — the caller never sees the secret.
invoke
Execute a proxied request and print the raw upstream response.aivault capability invoke.
Examples
json
Invoke and print the response as parsed JSON.aivault capability json.
markdown
Invoke and print the response converted to markdown. Useful for LLM-friendly output.md
Invoke options
| Flag | Description |
|---|---|
--method | HTTP method (defaults to capability’s first allowed method) |
--path | Request path (defaults to capability’s first path prefix) |
--header | Additional request header (repeatable) |
--body | Request body (JSON string) |
--body-file-path | Read request body from file |
--request | Full request envelope as JSON |
--request-file | Read full request envelope from file |
--multipart-field | Multipart form field as name=value (repeatable) |
--multipart-file | Multipart form file as name=/path/to/file (repeatable) |
--credential | Specific credential to use (overrides default resolution) |
--workspace-id | Workspace context for credential resolution |
--group-id | Group context for credential resolution |
--client-ip | Client IP for audit context (default: 127.0.0.1) |
Response handling
- Raw mode (
invoke): prints the response body as-is - JSON mode (
json): parses and pretty-prints as JSON - Markdown mode (
markdown): converts JSON response to markdown with optional namespace wrapping, field exclusion, and field wrapping