Skip to main content

Deployment

Bailian CLI command reference for creating and managing text, audio, and image deployments and throughput reservations.

Manage the full model deployment lifecycle from the terminal: choose the create command for text, audio, or image, and manage deployments, rate limits, scaling, and throughput reservations.
Append --help to any command for full parameter details, e.g. bl deploy list --help. Command details on this page are verified against bl 2.5.1.

Choose a command by modality

ModalityCreate commandDescription
Textbl deploy text createDeploy text models with the lora, ptu, or mu plan
Audiobl deploy audio createDeploy audio (TTS) models
Imagebl deploy image createDeploy image generation models

Text deployment

bl deploy text create

Create a text model deployment. Requires API Key authentication. Usage
bl deploy text create
ParameterTypeRequiredDescription
--model-name <model_name>stringyesModel to deploy — fine-tuned output name or catalog model
--display-name <display_name>stringnoConsole display name (optional for PTU; required for other plans)
--plan <plan>stringnoBilling plan: lora (default, Token-billed) | ptu (throughput reservation) | mu
--deploy-spec <id>stringnoDeploy spec (only used by plan=mu; auto-picked if omitted)
--capacity <n>numbernoResource units (plan=mu only; required by API; defaults to the template's unit)
--billing-method <m>stringnoBilling method (plan=mu only; default "POST_PAY", the only supported value)
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--thinking-output-tpm <n>numbernoLegacy thinking-output capacity flag; not supported for PTU
--charge-type <type>stringnoPTU payment type (required for plan=ptu): pre_paid or post_paid
--service-tier <tier>stringnoPTU service tier: ptu_fast (default) or ptu_default (prepaid only)
--suffix <suffix>stringnoOptional PTU ModelCode suffix; generated by the service when omitted
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--yesswitchnoConfirm this high-risk operation
Creating a deployment purchases or provisions resources and may incur charges.
Example: Create a text model deployment with specified name and display name
bl deploy text create --model-name my-qwen-sft --display-name my-sft-test
  • Plan defaults to lora (Token-billed) for text/image and mu (model-unit-billed) for audio (CosyVoice TTS). Pass --plan to override.
  • For plan=ptu, --charge-type, --input-tpm and --output-tpm are required. Capacity is in kTPM (1 kTPM = 1000 tokens/minute). Separate thinking-output capacity is unsupported. Prepaid requires --duration and explicit --auto-renewal true|false.
  • For plan=mu, capacity, billing_method and deploy_spec are required. billing_method defaults to POST_PAY (only supported value); deploy_spec and capacity are auto-picked from GET /deployments/models when omitted.
  • Use deploy models --source base to inspect available templates.
  • PTU creation preserves the original JSON and operation_id even with --quiet. --wait only queries the returned operation; pending capacity is not effective capacity. Check the actual status before invoking the model.
  • --model-name identifies the source model; the returned deployed_model is the invocation identifier (ModelCode). Use it for inference (text chat --model <deployed_model>) and deployment lifecycle commands.
  • Initial ModelCode creation does not support --request-id or promise idempotency. A timeout is not proof of failure: check whether the deployment was created before trying again. This command never automatically resubmits creation.
  • Use --dry-run to preview without requests. Pass --yes only after confirming the costs.

Audio deployment

bl deploy audio create

Create an audio (TTS) model deployment. Requires API Key authentication. Usage
bl deploy audio create
ParameterTypeRequiredDescription
--model-name <model_name>stringyesModel to deploy — fine-tuned output name or catalog model
--display-name <display_name>stringnoConsole display name (optional for PTU; required for other plans)
--plan <plan>stringnoBilling plan: lora (default, Token-billed) | ptu (throughput reservation) | mu
--deploy-spec <id>stringnoDeploy spec (only used by plan=mu; auto-picked if omitted)
--capacity <n>numbernoResource units (plan=mu only; required by API; defaults to the template's unit)
--billing-method <m>stringnoBilling method (plan=mu only; default "POST_PAY", the only supported value)
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--thinking-output-tpm <n>numbernoLegacy thinking-output capacity flag; not supported for PTU
--charge-type <type>stringnoPTU payment type (required for plan=ptu): pre_paid or post_paid
--service-tier <tier>stringnoPTU service tier: ptu_fast (default) or ptu_default (prepaid only)
--suffix <suffix>stringnoOptional PTU ModelCode suffix; generated by the service when omitted
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--yesswitchnoConfirm this high-risk operation
Creating a deployment purchases or provisions resources and may incur charges.
Example: Create an audio model deployment with specified name and display name
bl deploy audio create --model-name my-cosyvoice-ft --display-name my-tts
  • Plan defaults to lora (Token-billed) for text/image and mu (model-unit-billed) for audio (CosyVoice TTS). Pass --plan to override.
  • For plan=ptu, --charge-type, --input-tpm and --output-tpm are required. Capacity is in kTPM (1 kTPM = 1000 tokens/minute). Separate thinking-output capacity is unsupported. Prepaid requires --duration and explicit --auto-renewal true|false.
  • For plan=mu, capacity, billing_method and deploy_spec are required. billing_method defaults to POST_PAY (only supported value); deploy_spec and capacity are auto-picked from GET /deployments/models when omitted.
  • Use deploy models --source base to inspect available templates.
  • PTU creation preserves the original JSON and operation_id even with --quiet. --wait only queries the returned operation; pending capacity is not effective capacity. Check the actual status before invoking the model.
  • --model-name identifies the source model; the returned deployed_model is the invocation identifier (ModelCode). Use it for inference (text chat --model <deployed_model>) and deployment lifecycle commands.
  • Initial ModelCode creation does not support --request-id or promise idempotency. A timeout is not proof of failure: check whether the deployment was created before trying again. This command never automatically resubmits creation.
  • Use --dry-run to preview without requests. Pass --yes only after confirming the costs.

Image deployment

bl deploy image create

Create an image generation model deployment. Requires API Key authentication. Usage
bl deploy image create
ParameterTypeRequiredDescription
--model-name <model_name>stringyesModel to deploy — fine-tuned output name or catalog model
--display-name <display_name>stringnoConsole display name (optional for PTU; required for other plans)
--plan <plan>stringnoBilling plan: lora (default, Token-billed) | ptu (throughput reservation) | mu
--deploy-spec <id>stringnoDeploy spec (only used by plan=mu; auto-picked if omitted)
--capacity <n>numbernoResource units (plan=mu only; required by API; defaults to the template's unit)
--billing-method <m>stringnoBilling method (plan=mu only; default "POST_PAY", the only supported value)
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--thinking-output-tpm <n>numbernoLegacy thinking-output capacity flag; not supported for PTU
--charge-type <type>stringnoPTU payment type (required for plan=ptu): pre_paid or post_paid
--service-tier <tier>stringnoPTU service tier: ptu_fast (default) or ptu_default (prepaid only)
--suffix <suffix>stringnoOptional PTU ModelCode suffix; generated by the service when omitted
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--yesswitchnoConfirm this high-risk operation
Creating a deployment purchases or provisions resources and may incur charges.
Example: Create an image generation model deployment with specified name and display name
bl deploy image create --model-name my-wan-ft --display-name my-wan
  • Plan defaults to lora (Token-billed) for text/image and mu (model-unit-billed) for audio (CosyVoice TTS). Pass --plan to override.
  • For plan=ptu, --charge-type, --input-tpm and --output-tpm are required. Capacity is in kTPM (1 kTPM = 1000 tokens/minute). Separate thinking-output capacity is unsupported. Prepaid requires --duration and explicit --auto-renewal true|false.
  • For plan=mu, capacity, billing_method and deploy_spec are required. billing_method defaults to POST_PAY (only supported value); deploy_spec and capacity are auto-picked from GET /deployments/models when omitted.
  • Use deploy models --source base to inspect available templates.
  • PTU creation preserves the original JSON and operation_id even with --quiet. --wait only queries the returned operation; pending capacity is not effective capacity. Check the actual status before invoking the model.
  • --model-name identifies the source model; the returned deployed_model is the invocation identifier (ModelCode). Use it for inference (text chat --model <deployed_model>) and deployment lifecycle commands.
  • Initial ModelCode creation does not support --request-id or promise idempotency. A timeout is not proof of failure: check whether the deployment was created before trying again. This command never automatically resubmits creation.
  • Use --dry-run to preview without requests. Pass --yes only after confirming the costs.

Deployment management

bl deploy list

List model deployments and throughput reservations. Requires API Key authentication. Usage
bl deploy list [--page <n>] [--page-size <n>] [--plan <plan>] [--status <status>]
ParameterTypeRequiredDescription
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (default: 10, max 100)
--plan <plan>stringnoServer-side plan filter; use ptu for throughput reservations
--status <status>stringnoFilter only the fetched page locally by ModelCode status; total remains unfiltered
Example: List deployments filtered by plan ptu
bl deploy list --plan ptu
  • The deployment list API supports page_no/page_size/plan, not status. --status filters only the requested page, not the entire account; an empty filtered page does not mean there are no matches on later pages. total is the server total before local filtering; local_filter reports the current-page match count. PTU capacities are kTPM.

bl deploy get

Get details of a single model deployment. Requires API Key authentication. Usage
bl deploy get --deployed-model <id>
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
Example: Get details of a deployed model by identifier
bl deploy get --deployed-model qwen-plus-2025-12-01-b6d61c71
  • Preserves deployment fields including ptu_capacity (aggregate effective kTPM), ptu_service_tier, overflow_strategy and pre_paid_info. For mixed billing or multiple instances, query capacity list/get for each instance's status, expiry and capacity; ModelCode status is not instance status.

bl deploy update

Update a deployment's rate limits (rpm_limit / tpm_limit). Requires API Key authentication. Usage
bl deploy update --deployed-model <id> [--rpm-limit <n>] [--tpm-limit <n>]
ParameterTypeRequiredDescription
--deployed-model <id>stringyesDeployed model identifier
--rpm-limit <n>numbernoRequests per minute
--tpm-limit <n>numbernoTokens per minute
Example: Update rate limits for a deployed model
bl deploy update --deployed-model dep-... --rpm-limit 1000
  • At least one of --rpm-limit / --tpm-limit must be provided.

bl deploy scale

Scale a deployment's capacity. Requires API Key authentication. Usage
bl deploy scale --deployed-model <id> (--capacity <n> | --input-tpm <n> --output-tpm <n>) [--instance-id <id>] [flags]
ParameterTypeRequiredDescription
--deployed-model <id>stringyesDeployed model identifier
--capacity <n>numbernoMU target capacity: non-negative integer in plan units; must satisfy base_capacity
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--instance-id <id>stringnoPTU capacity instance ID; required when multiple unreleased instances exist
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--request-id <uuid>stringnoRequest identifier; generated if omitted. Reuse with identical parameters only for the same capacity operation
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--order-type <UPGRADE|DOWNGRADE>stringnoOptional order direction; otherwise the server decides
--yesswitchnoConfirm this high-risk operation
Scaling changes purchased capacity and may incur charges or reduce serving capacity.
Example: Preview scaling a deployment to capacity 8
bl deploy scale --deployed-model dep-... --capacity 8 --dry-run
  • PTU input/output values are the selected instance's absolute target capacity in kTPM (1 kTPM = 1000 tokens/minute), not deltas or deployment totals. Both zero is valid and does not release the instance. PTU options cannot be combined with --capacity.
  • Without --instance-id, execution must confirm exactly one unreleased instance and recheck can_scale. Dry-run does not resolve an instance or validate its billing type. Pass --yes only after confirming the costs and target.

bl deploy delete

Delete a model deployment (PTU must be STOPPED with all capacity released). Requires API Key authentication. Usage
bl deploy delete --deployed-model <id> [--skip-precheck]
ParameterTypeRequiredDescription
--deployed-model <id>stringyesDeployed model identifier
--skip-precheckswitchnoSkip local checks only; the service still validates deletion prerequisites
--yesswitchnoConfirm this high-risk operation
This permanently deletes the specified model deployment and cannot be undone.
Example: Preview deletion of a deployment
bl deploy delete --deployed-model dep-... --dry-run
  • PTU deletion requires STOPPED, all capacity instances released, and no processing or queued capacity operations. Pausing or scaling to zero does not release an instance; prepaid capacity may require unsubscription.
  • Local checks inspect the deployment, unreleased instances and any returned operation_id. There is no public queued-operation list API, so these checks cannot confirm all operations are finished; the service makes the final decision. --skip-precheck only omits local checks, never service validation or resource release requirements.

bl deploy pause

Pause a running model deployment (stops billing for mu/ptu). Usage
bl deploy pause --deployed-model <id> [--skip-precheck]
ParameterTypeRequiredDescription
--deployed-model <id>stringyesDeployed model identifier
--skip-precheckswitchnoSkip the local RUNNING/PENDING status precheck
Example: Pause a running model deployment to stop billing
bl deploy pause --deployed-model dep-...
  • While paused, billing ceases for mu/ptu plans. Use deploy resume to bring it back online or deploy delete to remove.
  • Precheck verifies status is RUNNING/PENDING before issuing the pause; pass --skip-precheck to bypass.

bl deploy resume

Resume a paused model deployment (brings service back online). Usage
bl deploy resume --deployed-model <id> [--skip-precheck]
ParameterTypeRequiredDescription
--deployed-model <id>stringyesDeployed model identifier
--skip-precheckswitchnoSkip the local STOPPED status precheck
Example: Resume a paused model deployment to bring service back online
bl deploy resume --deployed-model dep-...
  • Precheck verifies status is STOPPED before issuing the resume; pass --skip-precheck to bypass.
  • For mu/ptu plans, billing resumes once the service is back online.

bl deploy models

List models available for deployment. Requires API Key authentication. Usage
bl deploy models [--page <n>] [--page-size <n>] [--catalog-version <v>] [--source <custom|public>]
ParameterTypeRequiredDescription
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (default: 100)
--catalog-version <v>stringnoCatalog version filter (default: v1.0; required for new catalog models)
--source <s>stringnoModel source filter: custom (fine-tuned) | base (catalog) | public
Example: List available models for deployment filtered by source
bl deploy models --source base

Throughput reservation capacity

Purchasing, scaling, renewing, releasing, and setting overflow strategies for capacity instances are high-risk operations: execution is blocked without --yes; preview with --dry-run first.

bl deploy capacity list

List throughput reservation capacity instances. Requires API Key authentication. Usage
bl deploy capacity list --deployed-model <code> [--page <n>] [--page-size <n>] [--include-deleted <true|false>] [--statuses <status,...>] [--charge-types <pre_paid,post_paid>]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (1–100, default: 20)
--include-deleted <true|false>booleannoInclude released instances (default: true)
--statuses <status,...>stringnoInstance statuses, comma-separated (not ModelCode statuses)
--charge-types <pre_paid,post_paid>stringnoCharge types: pre_paid, post_paid; comma-separated
Example: List throughput reservation capacity instances for a model
bl deploy capacity list --deployed-model example-model-code
  • Preserves the API envelope and records/items/page/itemsPerPage/pageCount pagination. Capacities are kTPM; effective, configured and target capacities are distinct. STOPPED alone does not mean released: inspect deleted.

bl deploy capacity get

Get a throughput reservation capacity instance. Requires API Key authentication. Usage
bl deploy capacity get --deployed-model <code> --instance-id <id>
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--instance-id <id>stringyesCapacity instance ID returned by the API
Example: Get details of a specific throughput reservation capacity instance
bl deploy capacity get --deployed-model example-model-code --instance-id example-capacity-instance
  • Read-only; released instances can also be queried. Preserves the API envelope, capacity fields, can_scale/can_renew/can_delete and deleted. Capacities are kTPM; the instance must belong to this ModelCode.

bl deploy capacity create

Purchase an additional capacity instance for a ModelCode. Requires API Key authentication. Usage
bl deploy capacity create --deployed-model <code> --billing-method <PRE_PAY|POST_PAY> --input-tpm <kTPM> --output-tpm <kTPM> [--duration <days>] [--auto-renewal <true|false>] [--wait]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--request-id <uuid>stringnoRequest identifier; generated if omitted. Reuse with identical parameters only for the same capacity operation
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--billing-method <PRE_PAY|POST_PAY>stringyesCapacity instance billing method (case-sensitive)
--yesswitchnoConfirm this high-risk operation
Purchases additional throughput capacity and may enable recurring charges.
Example: Preview purchase of a new capacity instance with specified parameters
bl deploy capacity create --deployed-model example-code --billing-method POST_PAY --input-tpm 10000 --output-tpm 1000 --dry-run
  • Keeps the ModelCode, model and performance tier. Only one unreleased postpaid instance is allowed per ModelCode; the server validates purchase eligibility and slot limits.

bl deploy capacity scale

Scale the absolute capacity of one reservation instance. Requires API Key authentication. Usage
bl deploy capacity scale --deployed-model <code> --instance-id <id> --input-tpm <kTPM> --output-tpm <kTPM> [--order-type <UPGRADE|DOWNGRADE>] [--wait]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--instance-id <id>stringyesCapacity instance ID returned by the API
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--order-type <UPGRADE|DOWNGRADE>stringnoOptional order direction; otherwise the server decides
--request-id <uuid>stringnoRequest identifier; generated if omitted. Reuse with identical parameters only for the same capacity operation
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--yesswitchnoConfirm this high-risk operation
Changes purchased capacity, may incur charges and can reduce serving capacity to zero.
Example: Preview scaling of a capacity instance's input and output throughput
bl deploy capacity scale --deployed-model example-code --instance-id example-instance --input-tpm 20000 --output-tpm 2000 --dry-run
  • Refreshes can_scale before writing. Omitted prepaid settings remain omitted, so the server can reuse saved information. Postpaid instances cannot receive prepaid settings.

bl deploy capacity renew

Renew a prepaid capacity instance, optionally changing capacity. Requires API Key authentication. Usage
bl deploy capacity renew --deployed-model <code> --instance-id <id> --duration <days> --auto-renewal <true|false> [--is-change <true|false>] [--input-tpm <kTPM>] [--output-tpm <kTPM>] [--wait]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--instance-id <id>stringyesCapacity instance ID returned by the API
--input-tpm <kTPM>numbernoAbsolute input capacity in kTPM (1 kTPM = 1000 tokens/minute)
--output-tpm <kTPM>numbernoAbsolute output capacity in kTPM
--duration <days>numbernoPrepaid purchase/renewal duration, positive integer days
--auto-renewal <true|false>booleannoExplicitly enable or disable automatic renewal for prepaid purchases
--auto-renewal-duration <days>numbernoAutomatic renewal duration; required when enabled
--auto-renewal-cycle <cycle>stringnoOptional supported renewal cycle, e.g. Day
--request-id <uuid>stringnoRequest identifier; generated if omitted. Reuse with identical parameters only for the same capacity operation
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--is-change <true|false>booleannoChange capacity during renewal (default: false)
--yesswitchnoConfirm this high-risk operation
Renews a paid capacity instance and may enable automatic recurring renewal.
Example: Preview renewal of a prepaid capacity instance with new settings
bl deploy capacity renew --deployed-model example-code --instance-id example-instance --duration 30 --auto-renewal false --dry-run
  • Prepaid only; refreshes can_renew. Different capacity requires --is-change true; an unchanged capacity may be sent with false. No order_type is accepted by this endpoint.

bl deploy capacity delete

Release a capacity instance without deleting its ModelCode. Requires API Key authentication. Usage
bl deploy capacity delete --deployed-model <code> --instance-id <id> [--reason <text>] [--wait]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--instance-id <id>stringyesCapacity instance ID returned by the API
--request-id <uuid>stringnoRequest identifier; generated if omitted. Reuse with identical parameters only for the same capacity operation
--waitswitchnoWait for the returned capacity operation and refresh capacity
--interval <seconds>numbernoInitial wait poll interval (1–3600, default: 2 seconds)
--poll-timeout <seconds>numbernoWait budget after submission (default: 600 seconds)
--reason <text>stringnoOptional release reason, sent as a query parameter
--yesswitchnoConfirm this high-risk operation
Releases serving capacity and may interrupt requests; this cannot be undone by this command. This is not a prepaid unsubscribe/refund action.
Example: Preview release of a capacity instance without deleting the model
bl deploy capacity delete --deployed-model example-code --instance-id example-instance --dry-run
  • Active prepaid instances must be unsubscribed via deploy capacity unsubscribe (billing console link), even when can_delete=true. Failed prepaid instances may have no associated order; only the server can decide whether direct release is supported. Release is asynchronous; verify deleted=true, not merely STOPPED or zero capacity.

bl deploy capacity unsubscribe

Build the Aliyun billing console unsubscribe link for a prepaid capacity instance. No authentication required. Usage
bl deploy capacity unsubscribe --instance-id <id>
ParameterTypeRequiredDescription
--instance-id <id>stringyesCapacity instance ID returned by the API
Example: Generate an Aliyun billing console unsubscribe link for a prepaid instance
bl deploy capacity unsubscribe --instance-id example-instance
  • No API is called and nothing is unsubscribed by this command; it only builds the refund page link. Open the link and finish the unsubscribe flow in the billing console with the account that placed the order.
  • Only prepaid instances are unsubscribed this way; postpaid instances are released with deploy capacity delete. The ID is the capacity instance ID (see deploy capacity list / get), not the ModelCode. Unsubscription may interrupt serving and is irreversible; refund rules are decided by the billing console.

bl deploy overflow

Set the overflow strategy for a throughput reservation ModelCode. Requires API Key authentication. Usage
bl deploy overflow --deployed-model <code> --strategy <enable|disable>
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--strategy <enable|disable>stringyesAllow pay-as-you-go overflow or restrict requests to reserved capacity
--yesswitchnoConfirm this high-risk operation
Enabling overflow incurs pay-as-you-go charges beyond reserved capacity; disabling it rate-limits excess requests.
Example: Preview enabling overflow strategy for a throughput reservation model
bl deploy overflow --deployed-model example-code --strategy enable --dry-run
  • Applies to the whole ModelCode, not one capacity instance. Sends one update then one GET to confirm the strategy. Never retries the update automatically; a read-back failure does not mean the change was not applied.

bl deploy operation get

Query a throughput reservation capacity operation once. Requires API Key authentication. Usage
bl deploy operation get --deployed-model <code> --operation-id <id>
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--operation-id <id>stringyesCapacity operation ID returned by a write request
Example: Query the status of a specific capacity operation
bl deploy operation get --deployed-model example-model-code --operation-id 100001
  • Preserves the API envelope, including FAILED and its error fields; a successful GET returns exit code 0 regardless of operation status. Use operation wait to wait for success or fail with a non-zero exit. Use the actual returned operation ID; do not construct one.

bl deploy operation wait

Wait for a capacity operation and refresh confirmed capacity. Requires API Key authentication. Usage
bl deploy operation wait --deployed-model <code> --operation-id <id> [--interval <seconds>] [--poll-timeout <seconds>]
ParameterTypeRequiredDescription
--deployed-model <code>stringyesDeployed model identifier (ModelCode)
--operation-id <id>stringyesCapacity operation ID returned by a write request
--interval <seconds>numbernoInitial poll interval (1–3600 seconds, default: 2); doubles up to max(initial, 30)
--poll-timeout <seconds>numbernoTotal wait budget including requests and refresh (default: 600 seconds)
Example: Wait for capacity operation and refresh confirmed capacity
bl deploy operation wait --deployed-model example-model-code --operation-id 100001
  • Read-only GET polling: PROCESSING continues, FAILED exits 1 with the server error, SUCCEEDED refreshes the instance (when an ID is returned) and deployment. Output preserves the operation envelope and adds instance/deployment response envelopes. Missing or unknown status fails rather than assuming success.
  • --timeout limits each HTTP request; --poll-timeout bounds the entire wait (exit 5 on expiry). Ctrl-C stops local waiting, not the remote operation. No write is retried; use the original operation ID after a timeout or interruption.