--field, --raw-field, or --input is provided. JSON responses are pretty-printed by default; non-JSON responses are streamed raw. Use --jq to filter JSON responses. Pass --verbose to log the request URL, the response status, and the response headers to stderr.
management
Options
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
Examples
GET a management resourceFilter output with --jq
List model IDs from /v1/models
Output
Text mode (--output text): The HTTP response body, passed through verbatim. JSON responses are pretty-printed; non-JSON responses are streamed raw to stdout.
JSON mode (--output json): payload type cmd.JSONUndefined.
Shape depends on the requested endpoint. See the management API OpenAPI spec at https://api.baseten.co/v1/spec.
inference
--model-id or --chain-id to identify the target. Use --environment to target a specific environment (e.g. production).
Options
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
Examples
POST a predict body to a modelFilter output with --jq
Filter a JSON predict response
Output
Text mode (--output text): The inference endpoint’s response body, passed through verbatim. JSON responses are pretty-printed; non-JSON responses are streamed raw.
JSON mode (--output json): payload type cmd.JSONUndefined.
Shape depends on the model and endpoint. See the inference API OpenAPI spec at https://api.baseten.co/inference-spec.
sandbox
PRE-RELEASE: Sandbox commands are not GA yet. Their arguments, flags, and output may change.
--sandbox-url, the sandbox’s URL as shown by baseten sandbox describe, so baseten api sandbox process --sandbox-url <url> requests <url>/process.
Options
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
Examples
List processes in a sandbox, looking up its URL by nameFilter output with --jq
Filter a JSON sandbox API response
Output
Text mode (--output text): The sandbox API’s response body, passed through verbatim. JSON responses are pretty-printed; non-JSON responses are streamed raw.
JSON mode (--output json): payload type cmd.JSONUndefined.
Shape depends on the requested endpoint.