pixa command supports a --json flag that wraps the response in a consistent envelope. This makes it straightforward for agents and scripts to parse results without brittle text matching.
Success envelope
ok— Alwaystruefor successful responses.data— The result payload. For single-item commands this is an object; for list commands this is an array.meta— Pagination metadata. Present on list responses.
Error envelope
ok— Alwaysfalsefor errors.error.code— A machine-readable error code.error.message— A human-readable description.error.hint— An optional recovery suggestion.
List responses
When a command returns multiple items,data is an array and meta includes pagination info:
--limit and --after flags to paginate through results.
JSON input shapes for pixa run
Prompt mode
Pipeline run
Direct tool
--json-input flag or piped through stdin:
Parsing output in shell scripts
Usejq to extract fields from JSON output:
Common error codes and recovery
| Code | Meaning | Recovery |
|---|---|---|
not_found | The requested resource does not exist | Verify the ID and try again |
unauthorized | Session expired or not logged in | Run pixa auth login or check PIXA_API_KEY |
validation_error | Invalid input (missing flag, bad format) | Check the error hint and fix the request |
rate_limited | Too many requests | Wait and retry after a short delay |
conflict | Resource already exists or is in use | Use a different name or resolve the conflict |
timeout | The operation timed out | Retry, or use --timeout to increase the limit |
Next steps
Running Tasks
Learn the full set of flags and patterns for
pixa run.CLI Reference
Explore every command, flag, and input format.