--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.
management
Options
TEXT (repeatable)
Add a string field (key=value), parsed as JSON value
TEXT (repeatable)
Add a request header (key:value)
TEXT
Read request body from file (use - for stdin)
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
HTTP method, defaults to GET or POST if fields are provided
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT (repeatable)
Add a raw string field (key=value)
BOOL
Enable verbose logging
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
TEXT
Chain ID to target
TEXT
Environment name (e.g. production)
TEXT (repeatable)
Add a string field (key=value), parsed as JSON value
TEXT (repeatable)
Add a request header (key:value)
TEXT
Read request body from file (use - for stdin)
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
HTTP method, defaults to GET or POST if fields are provided
TEXT
Model ID to target
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT (repeatable)
Add a raw string field (key=value)
BOOL
Enable verbose logging
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
TEXT (repeatable)
Add a string field (key=value), parsed as JSON value
TEXT (repeatable)
Add a request header (key:value)
TEXT
Read request body from file (use - for stdin)
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
HTTP method, defaults to GET or POST if fields are provided
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT (repeatable)
Add a raw string field (key=value)
TEXT
required
Sandbox URL to target, as shown by ‘baseten sandbox describe’
BOOL
Enable verbose logging
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.