The throughput reservation API is used to create, query, and manage throughput reservation capacity. Each throughput reservation is identified by a dedicated model code and can contain multiple capacity instances; each instance corresponds to one capacity purchase and can be scaled, renewed, or released individually.
| node | API | For more information, see |
|---|---|---|
| Create a throughput reservation | POST /api/v1/deployments | Create a throughput reservation |
| Query reservation details | GET /api/v1/deployments/{deployed_model} | Query throughput reservation details |
| Query the reservation list | GET /api/v1/deployments | Query throughput reservation list |
| Purchase an additional capacity instance | POST /api/v1/deployments/{deployed_model}/capacity-instances | Purchase an additional capacity instance |
| Scale capacity instances | PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/scale | Scale capacity instances |
| Renew capacity instances | PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/renew | Renew capacity instances |
| Enable / Disable auto-renewal | PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/auto-renew | Set auto-renewal |
| Unsubscribe from / release capacity instances | DELETE /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id} | Delete capacity instance |
| Modify the overflow strategy | PUT /api/v1/deployments/{deployed_model}/update-overflowstrategy | Modify the overflow strategy |
| Delete a throughput reservation | DELETE /api/v1/deployments/{deployed_model} | Delete throughput reservation |
| Query the capacity instance list | GET .../capacity-instances | Query capacity instance list |
| Query capacity operation status | GET .../operations/{id} | Query capacity operation status |
| Error codes | — | Error codes |
Authentication and API call preparation
Use the Model Studio API Key of the region you are calling and pass it in the request header as Authorization: Bearer <api-key>. An API Key is bound to its region and cannot be used across regions. If the request body is JSON, pass Content-Type: application/json.
The workspace-dedicated domain format is https://{workspaceId}.{region}.maas.aliyuncs.com; use the Endpoint of the target workspace and region. To specify a sub-workspace, set the request header X-DashScope-WorkSpace: <workspace-id>。
The DashScope API domain is https://dashscope.aliyuncs.com. The Virginia region uses https://{workspaceId}.us-east-1.maas.aliyuncs.com.
For the console entry, see Throughput reservation; for deployment concepts, see Model deployment; for general deployment APIs, see Deploy models by using APIs.
General rules
The API base path is /api/v1/deployments, which follows the DashScope OpenAPI domain and authentication method of the region you are calling. Requests use Content-Type: application/json. Use the account, model, and deployment of the target region.
deployed_model: the dedicated model code of the throughput reservation (the calling identity);model_service_idin instance and operation responses refers to the same object.instance_id: the capacity instance ID. Use the value returned by the API; do not infer the billing method from the string format.operation_id: the operation ID. Use the string value returned by the API.- The example IDs, model names, and capacity values below are placeholders. Actual models, minimum values, steps, upper limits, and purchase durations are subject to the models and purchase restrictions of the target region.
- JSON examples omit some optional response fields; the phase statuses in the examples are not fixed returns for every request.
Recommended call sequence
The result of an asynchronous capacity operation is obtained via Query capacity operation.
- Query instance details to check capability switches and the latest configuration.
- Initiate a purchase / scaling / renewal / deletion request and save the
operation_id. - If
PROCESSINGis returned, poll the operation periodically with gradual backoff; if it is already in a final state, handle the result directly. - After
SUCCEEDED, refresh the instance and the dedicated model code; ifFAILED, showerror_code/error_message. A network timeout does not mean the operation failed; check existing operations first.
Create a throughput reservation
POST /api/v1/deployments
Creates a throughput reservation and purchases the first capacity instance, returning the dedicated model code used to call the model. To add capacity to an existing throughput reservation, call Purchase an additional capacity instance.
| Field | Type | Required | Description |
|---|---|---|---|
model_name | String | Yes | Base model name |
plan | String | Yes | ptu |
service_tier | String | No | Performance tier: ptu_fast for high-speed (default), ptu_default for standard mode. When pricing_cycle is Hour, you must explicitly pass ptu_default; if omitted, the request will be treated as the default high-speed tier and rejected |
charge_type | String | Yes | pre_paid (upfront) / post_paid (Pay-as-you-go) |
name | String | No | Display name; automatically generated if not specified. |
suffix | String | No | Suffix of the dedicated model code; automatically generated if not specified. |
ptu_capacity | Object | Yes | Capacity configuration. For more information, see capacity parameters |
pre_paid_info | Object | Conditionally required | Required for upfront payment. For more information, see upfront parameters; not passed for Pay-as-you-go |
overflow_strategy | String | No | Overflow policy: enable means overflow usage is billed on a pay-as-you-go basis, while disable means requests are throttled once the capacity is exceeded; set at creation |
ptu_default supports upfront payment; ptu_fast supports both upfront and Pay-as-you-go. New capacity instances inherit the performance tier of the dedicated model code.
ptu_default standard mode supports two billing cycles: by day and 8-hour slots. By day corresponds to pricing_cycle=Day, and the 8-hour slot corresponds to pricing_cycle=Hour with duration=8. The 8-hour slot is supported only by ptu_default standard mode; ptu_fast high-speed does not support it. The 8-hour service slot must fall entirely within the daily 22:00–08:00 selling window, so orders can be placed only from 22:00 on the current day to 00:00 the next day (for billing rules, see throughput reservation billing). An 8-hour slot can be created through this API (pass pricing_cycle=Hour and duration=8) or added to an existing reservation through stacked capacity instance purchase.
By-day upfront payment example:
ptu_default standard mode only):
ptu_capacity
Capacity is measured in kTPM (1 kTPM = 1000 Tokens per minute).
| Field | Type | Description |
|---|---|---|
input_tpm | Long | Input capacity, in kTPM; starting from 200 kTPM in increments of 10 kTPM |
output_tpm | Long | Output capacity, in kTPM; starting from 20 kTPM in increments of 1 kTPM |
thinking_output_tpm | Long | Thinking output capacity; this dimension is supported only by some models |
pre_paid_info
| Field | Type | Description |
|---|---|---|
pricing_cycle | String | Billing cycle: Day for by day (default), Hour for the 8-hour slot; Hour is supported only by ptu_default standard mode; case-sensitive |
duration | Integer | Purchase / renewal duration, with the unit following pricing_cycle: days for Day, hours for Hour and fixed at 8; must be greater than 0 |
auto_renewal | Boolean | Explicitly specifies whether to enable auto-renewal; must be false in the Hour scenario |
auto_renewal_duration | Integer | Required and greater than 0 when auto-renewal is enabled, in days; not passed in the Hour scenario |
auto_renewal_cycle | String | Optional renewal cycle unit; pass a value supported by the product, for example Day for days; not passed in the Hour scenario |
Create response
output is the deployment object (Query throughput reservations). When creating a capacity instance, operation_id and instance_id may be returned; if the purchase order of an upfront instance has not been fully processed yet, instance_id may be temporarily absent and can be obtained through subsequent queries.
operation_id is present, query it via Query capacity operations; if the creation request times out, first confirm whether it has already been created to avoid creating duplicate dedicated model codes.
Query API
Query throughput reservation details
GET /api/v1/deployments/{deployed_model}
Query the configuration and status of a specified throughput reservation, as well as the effective aggregated capacity of all capacity instances.
curl request example:
| Field | Description |
|---|---|
deployed_model | The invocation identity of the throughput reservation (dedicated model code). |
model_name | The base model name. |
plan | The type identity, which is ptu for throughput reservations. |
status | The status of the dedicated model code, which does not represent the status of each capacity instance |
ptu_service_tier | Performance tier: ptu_fast indicates high speed, and ptu_default indicates standard mode |
ptu_capacity | The effective aggregated input and output capacity of all capacity instances under this dedicated model code |
charge_type | Values: pre_paid (upfront) / post_paid (pay-as-you-go) |
pre_paid_info | The upfront purchase and renewal configuration, including pricing_cycle (Day by day / Hour as an 8-hour period), duration, and more. When multiple capacity instances exist, query the pre_paid_info of the target instance through instance details. |
pre_paid_instance_id | The upfront instance identity. When multiple capacity instances exist, obtain the instance_id of each instance from the capacity instance list and specify the instance to operate on. |
pre_paid_gmt_expired | The upfront expiration time. When multiple capacity instances exist, obtain the expiration time from the gmt_expired field in the target instance details. For the expiration time calculation rules, see TPM reservation billing. |
overflow_strategy | The overflow policy: enable indicates that overflow usage is billed on a pay-as-you-go basis, and disable indicates that requests are rate-limited once the capacity is exceeded. For overflow billing rules, see TPM reservation billing. |
fail_reason | The failure reason. |
gmt_create | The creation time. |
gmt_modified | The last modification time. |
operation_id | The capacity operation ID, used to query operation results; it may be returned in the response of the corresponding write operation. |
instance_id | The capacity instance ID. It may not be returned while the purchase order is still being processed; obtain it through subsequent queries. |
charge_type of each instance in the capacity instance list. The deployment status and billing type cannot replace the status and billing type of each instance.
Query the throughput reservation list
GET /api/v1/deployments?page_no=1&page_size=10&plan=ptu
Query the throughput reservation list with pagination.
curl request example:
| Query parameters | Description |
|---|---|
page_no | Page number. Default: 1 |
page_size | Number of entries per page. Default: 10. Range: [1,100] |
plan | Optional type filter. Pass ptu when querying throughput reservations; the performance tier is indicated by service_tier and is not a value of plan |
status parameter. To filter capacity instances, use the statuses parameter of Query the capacity instance list (including deleted instances).
Query the capacity instance list
GET /api/v1/deployments/{deployed_model}/capacity-instances?page_no=1&page_size=20&include_deleted=true
curl request example:
| Query parameters | Type | Description |
|---|---|---|
page_no | Integer | Default: 1 |
page_size | Integer | Default: 20. Range: [1,100] |
include_deleted | Boolean | Default: true; explicitly pass false to show only instances that have not been deleted |
statuses | String list | Optional. Multiple values separated by commas, for example RUNNING,STOPPED |
charge_types | String list | Optional, pre_paid,post_paid |
name | The reservation name. | |
base_model | The base model name. | |
base_capacity | The currently effective capacity. | |
workspace_id | The workspace ID. | |
creator | The creator. | |
modifier | The last modifier. |
records is the current page, items is the total count, page is the page number, and the field names itemsPerPage / pageCount are subject to the actual API response. Instances with effective capacity are listed first, then sorted by creation time in descending order. The list only supports the query parameters listed in this section.
Query capacity instance details
GET /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}
Returns the instance object of the capacity instance; deleted instances can also be queried. The dedicated model code must match the instance; you cannot operate on an instance across a different dedicated model code.
curl request example:
After a pay-as-you-go instance is released, purchasing pay-as-you-go capacity again under the same dedicated model code reuses the original instance ID. The list and details are updated with the information of the newly purchased instance, and the original deletion record is no longer kept separately. The
configured_capacity after release may be zero; the configured capacity before release is not guaranteed to be retained.Query capacity operation status
GET /api/v1/deployments/{deployed_model}/capacity-operations/{operation_id}
curl request example:
request_id is the identifier of this query request, while the request_id in the operation object is the identifier of the original operation; the two may differ. The query path must belong to the dedicated model code that created the operation.
Use the operation_id actually returned by the write operation; do not construct one yourself. When you query a nonexistent numeric ID or an operation of another dedicated model code, HTTP 404 and CAPACITY_OPERATION_NOT_FOUND are returned; an invalid operation ID may return InternalError. Verify the ID first and then retry.
Capacity management APIs
The following APIs all use /api/v1/deployments/{deployed_model} as the prefix.
Purchase additional capacity instances
POST /api/v1/deployments/{deployed_model}/capacity-instances
| Field | Required | Description |
|---|---|---|
billing_method | Yes | Billing method: PRE_PAY for upfront and POST_PAY for pay-as-you-go. Values are case-sensitive |
ptu_capacity | Yes | New instance capacity |
pre_paid_info | Conditionally required | Required for upfront and not passed for pay-as-you-go |
ptu_default standard mode, with billing_method fixed to PRE_PAY and pre_paid_info passing pricing_cycle=Hour / duration=8 / auto_renewal=false):
pricing_cycle is Hour; gmt_effective is the effective time at a whole hour in Beijing time; gmt_expired is 8 hours later than gmt_effective; and can_scale, can_renew, can_enable_auto_renew, can_disable_auto_renew, and can_delete are all false.
Pay-as-you-go example:
Scale capacity instances
PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/scale
can_scale before calling; an upfront instance suspended due to expiration cannot be scaled directly and should be renewed first. 8-hour window instances do not support scaling; the call returns CAPACITY_INSTANCE_OPERATION_UNSUPPORTED.
Renew a Capacity Instance
PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/renew
Standard renewal:
order_type. Only upfront instances can be renewed; check can_renew first. Returns an operation object. 8-hour time-slot instances do not support renewal or auto-renewal; the call returns CAPACITY_INSTANCE_OPERATION_UNSUPPORTED.
Configure Auto-Renewal
PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/auto-renew
Enable auto-renewal:
| Field | Type | Required | Description |
|---|---|---|---|
auto_renewal | Boolean | Yes | Whether to enable auto-renewal |
auto_renewal_cycle | String | Yes | Billing cycle; must be Day. Passing other values returns InvalidParameter |
auto_renewal_duration | Integer | Yes | Number of days purchased per auto-renewal, a positive integer |
operation_type is AUTO_RENEW, usually completed synchronously with status SUCCEEDED). Before calling, query the instance's can_enable_auto_renew / can_disable_auto_renew to determine whether enabling or disabling is currently allowed; to disable auto-renewal, pass "auto_renewal": false. 8-hour time-slot instances do not support auto-renewal.
Delete a Capacity Instance
DELETE /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}
The optional query parameter reason is the deletion reason, URL-encoded; no JSON request body is required. Returns an operation object.
curl request example:
- Pay-as-you-go: released via the deletion process; when complete,
deleted=trueandstatus=STOPPED, with effective capacity of zero. - Active upfront instances: this API cannot replace unsubscription; calling it directly returns
PREPAID_UNSUBSCRIBE_REQUIRED. After unsubscribing and releasing the capacity, it likewise ends withdeleted=trueandstatus=STOPPED. - 8-hour time-slot instances do not support deletion or unsubscription; the capacity automatically expires when the time slot ends; the call returns
PREPAID_UNSUBSCRIBE_REQUIRED. can_delete=trueindicates that the current state allows entering the deletion / unsubscription process; it does not mean upfront instances can skip unsubscription and directly DELETE. For failed instances that have no associated order yet, handle them based on the API response.
deleted field. For more information about the unsubscription refund formula, see Throughput Reservation Billing.
Modify the Overflow Strategy
PUT /api/v1/deployments/{deployed_model}/update-overflowstrategy
overflow_strategy is required and only supports lowercase enable / disable. enable means traffic exceeding the throughput reservation capacity is allowed to overflow to the public pool and is billed on a pay-as-you-go basis; disable means excess requests return a 429 rate-limit error (only reserved capacity is used). The configuration applies to the entire dedicated model code; capacity packages do not have a separate overflow strategy. For more information about overflow billing rules, see Throughput Reservation Billing.
The response contains request_id and output. After the modification, you can call Query Throughput Reservation to get overflow_strategy and confirm the configuration has been updated.
Scaling (Legacy API)
Legacy API; Scale a Capacity Instance is recommended instead. This API is retained for compatibility and returns a deployment object rather than a capacity operation object.
PUT /api/v1/deployments/{deployed_model}/scale
Adjusts the input and output capacity of a specified capacity instance under a throughput reservation. When multiple undeleted instances exist, the target instance must be specified via instance_id.
| Field | Required | Description |
|---|---|---|
instance_id | Conditionally required | Required when multiple undeleted instances exist; can be omitted when only one undeleted instance exists |
ptu_capacity | Yes | The absolute capacity of the instance after the change |
pre_paid_info | No | For upfront, the saved information is reused when not passed; do not pass it for pay-as-you-go |
order_type | No | UPGRADE means scale up and DOWNGRADE means scale down; if omitted, it is determined by the server, and the value passed must be consistent with the direction of the capacity change |
output returns throughput reservation information, and the ID of the corresponding capacity operation is returned via operation_id. If multiple instances exist without a specified ID, CAPACITY_INSTANCE_REQUIRED is returned. For new integrations, Scale a Capacity Instance is recommended.
Upfront changes involve orders; pay-as-you-go does not go through upfront change orders. Before the change is confirmed, the original effective capacity is retained; on failure, the target capacity must not be shown as effective. Scaling to all zero is not equivalent to deleting the instance.
Renew (Legacy API)
Legacy API; Renew a Capacity Instance is recommended instead. This API is retained for compatibility and returns a deployment object rather than a capacity operation object.
PUT /api/v1/deployments/{deployed_model}/renew
Renew a specified upfront capacity instance, with optional capacity adjustment. When there are multiple undeleted instances, the target instance must be specified via instance_id.
| Field | Required | Description |
|---|---|---|
instance_id | Conditionally required | Required when there are multiple undeleted instances; can be omitted for backward compatibility with a single instance |
pre_paid_info | Yes | Renewal information. For more information, see Prepaid parameters |
is_change | No | Defaults to false; whether to adjust the capacity at the same time |
ptu_capacity | No | If omitted, the configured capacity is retained; if a different capacity is passed, is_change=true is required |
order_type. output returns throughput reservation information and may contain a capacity operation ID; it is recommended to use the instance-level API Renew a capacity instance and poll the result.
Delete a throughput reservation
DELETE /api/v1/deployments/{deployed_model}
All capacity instances must be released first, the dedicated model code must be STOPPED, and there must be no running or queued capacity operations before the entire deployment can be deleted. Returns the deployment object.
curl request example:
STOPPED, but it is not automatically deleted as a result. Deleting a capacity instance and deleting the dedicated model code are two distinct operations.
Response fields
Capacity instance (CapacityInstance)
| Field | Type | Description |
|---|---|---|
model_service_id | String | The dedicated model code that the capacity instance or operation belongs to. |
instance_id | String | The capacity instance ID. |
charge_type | String | pre_paid (upfront) / post_paid (Pay-as-you-go) |
status | String | The instance lifecycle status. For more information, see the table below |
deleted | Boolean | Whether the instance has been deleted / released, used to identify released instances |
effective_capacity | Object | The capacity currently confirmed to be in service |
configured_capacity | Object | The configured / contracted capacity of the instance; retained even when stopped or suspended |
target_capacity | Object | The target capacity being changed to; may not be returned or may be empty in a stable state |
pre_paid_info | Object | The prepaid purchase and renewal configuration of this instance, including pricing_cycle (Day by day / Hour as an 8-hour period). For more information, see Prepaid parameters. |
gmt_effective | String | The effective time of the prepaid instance; 8-hour-period instances take effect on the hour in Beijing time. Parse it using the time zone offset, and do not treat the hour value of +00:00 directly as Beijing time. |
gmt_expired | String | The expiration time of the prepaid instance; for 8-hour-period instances, it is 8 hours after gmt_effective. For the expiration time calculation rules, see Throughput reservation billing. |
can_scale | Boolean | Whether scaling is currently allowed on the instance; fixed to false for 8-hour-period instances. |
can_renew | Boolean | Whether the instance can currently be renewed; fixed to false for 8-hour-period instances. |
can_enable_auto_renew | Boolean | Whether auto-renewal can currently be enabled; fixed to false for 8-hour-period instances. |
can_disable_auto_renew | Boolean | Whether auto-renewal can currently be disabled; fixed to false for 8-hour-period instances. |
can_delete | Boolean | Whether the instance can currently be deleted or unsubscribed; prepaid instances must still complete the unsubscription process, and it is fixed to false for 8-hour-period instances. |
fail_reason | String | Failure reason |
name | String | The reservation name. |
model_name | String | The base model name. |
plan | String | Fixed to ptu. |
ptu_capacity | Object | Capacity Configuration (input_tpm / output_tpm). |
ptu_service_tier | String | Reasoning Mode (ptu_default / ptu_fast). |
overflow_strategy | String | Spillover policy. |
gmt_create | Time | The creation time. |
gmt_modified | Time | The last modification time. |
| Status | Meaning and display suggestions |
|---|---|
WAIT_PRE_PAID_BILLING_TO_DEPLOYING / WAIT_TO_DEPLOY | Pending purchase processing / Pending activation |
RUNNING | Running |
WAIT_PRE_PAID_BILLING_TO_SCALING / SCALING | Waiting for a scaling order / Updating |
STOPPING / STOPPED | Stopping / Stopped; combine with deleted to distinguish Released |
SUSPENDING / SUSPENDED | Suspending / Suspended |
STARTING / RECOVERING | Starting / Resuming |
DELETING | Deleting |
FAILED | Failed; handle it based on the failure reason. |
deleted=true, not just status=STOPPED. An instance with STOPPED + deleted=false is still a retained instance. Instances with deleted=true do not allow scaling, renewal, or deletion.
The RUNNING status does not mean that all operations are available. When the same dedicated model code has an operation in progress or is subject to billing restrictions, the corresponding operations may be unavailable. Upfront SUSPENDED instances cannot be scaled; they can be renewed when the renewal conditions are met. Pay-as-you-go instances cannot be renewed. Before making a call, query the instance details again, use can_scale, can_renew, and can_delete to check whether an operation is available, and handle errors returned by the API.
Capacity operations (CapacityOperation)
| Field | Description |
|---|---|
operation_id | The capacity operation ID, used to query operation results; it may be returned in the response of the corresponding write operation. |
request_id | The request identity used to initiate this capacity operation. |
operation_type | Common values are CREATE, SCALE, RENEW, AUTO_RENEW, and DELETE; STOP and REFUND may also appear during lifecycle processing, which does not mean that public write APIs with the same names exist. |
operation_status | Values: PROCESSING, SUCCEEDED, FAILED |
model_service_id | The dedicated model code that the capacity instance or operation belongs to. |
instance_id | The capacity instance ID. It may not be returned while the purchase order is still being processed; obtain it through subsequent queries. |
from_status | The instance status before the operation. |
current_status | The current instance status. |
error_code | The error code returned when the operation fails. |
error_message | The error message returned when the operation fails. |
gmt_created | The creation time. |
gmt_finished | The time when the operation completed. |
PROCESSING is returned. SUCCEEDED / FAILED are terminal states; after receiving a terminal state, stop polling and refresh the instance and deployment summaries.
Error Handling and Retry
Retry and Request Identity
When retrying the same capacity write operation over the network, keep the request identity and parameters unchanged. It is recommended to set x-acs-req-uuid and X-DashScope-RequestId to the same UUID, to avoid an inconsistency between the two changing the actual identity. The current priority order is x-acs-req-uuid, X-DashScope-RequestId, and X-Request-Id; if none is provided, a new identity is generated.
A capacity operation with the same dedicated model code, the same valid request identity, and the same operation parameters reuses the existing operation; using the same identity with different parameters returns IDEMPOTENCY_KEY_CONFLICT. Use a new identity for each new business operation. Do not directly apply this instance-operation idempotency convention to the first creation of a dedicated model code.
Error codes
| Error Code | HTTP | Solution |
|---|---|---|
CAPACITY_INSTANCE_REQUIRED | 400 | Specify the target instance_id when multiple instances exist |
CAPACITY_INSTANCE_OPERATION_UNSUPPORTED | 400 | The operation is not supported by the current instance state: 8-hour window instances do not support scaling, renewal, or deletion; to delete a Model Code, you must first release all capacity instances and the state must be STOPPED |
PREPAID_UNSUBSCRIBE_REQUIRED | 400 | Redirected to the existing unsubscription flow |
POSTPAID_INSTANCE_ALREADY_EXISTS | 400 | Reuse an existing pay-as-you-go instance, or release it before creating a new one |
CAPACITY_SLOT_LIMIT_EXCEEDED / TOTAL_CAPACITY_INSTANCE_LIMIT_EXCEEDED | 400 | The limit on active instance slots or the total number including historical records has been reached |
MODEL_CODE_DELETED | 400 | Do not initiate write operations on a deleted throughput reservation |
MODEL_CODE_NOT_FOUND / CAPACITY_INSTANCE_NOT_FOUND | 404 | Check the region, account, dedicated model code, and instance ownership; performing scaling on a deleted instance can also return CAPACITY_INSTANCE_NOT_FOUND |
CAPACITY_OPERATION_NOT_FOUND | 404 | The operation does not exist or does not belong to the specified dedicated model code; verify the ID returned by the write operation |
InternalError | 500 | May be returned when an operation query passes an invalid non-numeric ID; verify the ID first, and for other internal errors, keep the request_id and contact technical support |
CAPACITY_INSTANCE_OPERATION_CONFLICT | 409 | Query existing operations and wait for them to complete before initiating a new operation |
IDEMPOTENCY_KEY_CONFLICT | 409 | Keep the original parameters when retrying; use a new identifier for different business operations |
BILLING_ACCOUNT_NOT_READY | 403 | Check whether the account meets the purchase requirements |
BILLING_SERVICE_UNAVAILABLE | 503 | Query existing operations and handle retries with a backoff strategy |
| HTTP Status Code | Error Code | Solution |
|---|---|---|
| 400 | InvalidParameter | Parameter validation failed. Common triggers: incorrect field name or casing (the stacking API requires billing_method to be set to PRE_PAY/POST_PAY); passing enable when the model's fixed overflow policy is disable; the model does not support 8-hour windows; the 8-hour service window is outside the selling hours; the capacity violates the base, increment, or upper-limit constraints. |
| 401 | InvalidApiKey | Check the validity and region of the API Key. |
| 403 | AccessDenied / Model.AccessDenied / App.AccessDenied | Check account permissions, workspace, and model authorization. |
| 404 | ModelNotFound | Verify the base model name and its supported scope. |
| 409 | Conflict | The deployment name is duplicated; change the name or suffix. |
| 429 | Throttling / Throttling.RateQuota / Throttling.AllocationQuota / | AllocationQuota indicates that the throughput reservation exceeds the quota; you can scale up the capacity or adjust the overflow policy. QuotaLimit indicates insufficient throughput reservation capacity quota in the workspace; you need to release or reduce existing capacity. |
| 500 | RequestTimeOut | Check existing operations first to avoid duplicate purchases; keep the request_id and contact technical support. |
| 503 | ModelUnavailable | Retry later or switch to an available model. |