# Cancel a Queued Seed3D Task

> Common

This endpoint only cancels queued tasks; it does not provide task deletion. Requests are handled according to the ModelVerse task status:

| Current Status | Action | Notes |
|---|---|---|
| Pending | Cancel task | Calls the upstream cancellation endpoint; no charge |
| Running | Rejected | Returns 409; running tasks cannot be cancelled |
| Success / Failure / Expired | Rejected | Returns 409; the task is not deleted and its status remains unchanged |
| Cancelled | Idempotent success | No additional upstream call |

**Note**: Successful tasks cannot be deleted through this endpoint. Task records are retained for 7 days.

## Endpoint

`GET https://api.modelverse.cn/v1/tasks/cancel`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| task_id | query | string | Yes | The ID of the queued task to cancel. |

## Responses

- **200** — Cancellation succeeded, or the task was already cancelled.
- **409** — The task is not Pending and cannot be cancelled. Running and finished tasks are not deleted.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "doubao-seed3d-2-0-260328 3D Model Generation API",
    "version": "1.0.0",
    "description": "This document describes the ModelVerse API for `doubao-seed3d-2-0-260328`, an image-to-3D model. It covers task submission, status queries, and cancellation.\nThe endpoints are `POST /v1/tasks/submit`, `GET /v1/tasks/status`, and `GET /v1/tasks/cancel`.\n\nThe model accepts a single image (public URL or Base64 Data URL) and produces a 3D model file (zip archive).\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "Mainland China"
    },
    {
      "url": "https://api.umodelverse.ai",
      "description": "Global"
    },
    {
      "url": "https://api-us-ca.umodelverse.ai",
      "description": "Los Angeles, US"
    },
    {
      "url": "https://api-sg.umodelverse.ai",
      "description": "Singapore"
    },
    {
      "url": "https://api-ge-fra.umodelverse.ai",
      "description": "Frankfurt"
    }
  ],
  "tags": [
    {
      "name": "Doubao Seed3D 2.0",
      "description": "Doubao Seed3D image-to-3D asynchronous tasks."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "Doubao Seed3D 2.0"
        ],
        "operationId": "submitDoubaoSeed3DTask",
        "summary": "Submit Seed3D Image-to-3D Task",
        "description": "Submit an asynchronous image-to-3D generation task. Pass a single image in `input.content`, and specify the output file format and polygon count level using a `type: text` item in `input.content`.\n\n**Image requirements**:\n- Exactly 1 image is required\n- Supports public URL or Base64 Data URL (`data:image/<format>;base64,<encoded>`)\n- Image dimensions must be within [300, 6000] px\n- Clear photos of real objects are recommended; solid-color images or simple geometric shapes may fail\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Seed3DSubmitRequest"
              },
              "examples": {
                "urlImage": {
                  "summary": "Submit with image URL (default parameters)",
                  "value": {
                    "model": "doubao-seed3d-2-0-260328",
                    "input": {
                      "content": [
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "https://example.com/bird.jpg"
                          }
                        }
                      ]
                    }
                  }
                },
                "base64Image": {
                  "summary": "Submit with Base64 image",
                  "value": {
                    "model": "doubao-seed3d-2-0-260328",
                    "input": {
                      "content": [
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
                          }
                        }
                      ]
                    }
                  }
                },
                "textParams": {
                  "summary": "Specify output format and polygon count level",
                  "value": {
                    "model": "doubao-seed3d-2-0-260328",
                    "input": {
                      "content": [
                        {
                          "type": "text",
                          "text": "--subdivisionlevel high --fileformat obj"
                        },
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "https://example.com/bird.jpg"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task submitted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DSubmitResponse"
                },
                "examples": {
                  "submitted": {
                    "summary": "Task submitted",
                    "value": {
                      "output": {
                        "task_id": "cgt-2025******-****"
                      },
                      "request_id": "xxx"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "ModelVerse request validation failed (wrong image count, invalid parameter values, etc.). No task is created and no charges apply.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Task submission failed. HTTP 500 may be returned when the image is smaller than 300px, the image format is unsupported, the image URL is inaccessible, the image content cannot be parsed, or the service is temporarily unavailable.\nNo task_id is returned when submission fails. No charge applies unless a task is successfully created and completed.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "Doubao Seed3D 2.0"
        ],
        "operationId": "getDoubaoSeed3DTaskStatus",
        "summary": "Query Seed3D Task Status",
        "description": "Query the status of an asynchronous task. On success, `output.urls` contains the download URL for the 3D model file (zip).\n\n- The zip file URL has a time-limited signature (approximately 24 hours). Download and store it promptly.\n- Task records are retained for 7 days and cannot be queried after expiration.\n",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "The `output.task_id` returned by `/v1/tasks/submit`.",
            "schema": {
              "type": "string"
            },
            "example": "cgt-2025******-****"
          }
        ],
        "responses": {
          "200": {
            "description": "Task status response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DStatusResponse"
                },
                "examples": {
                  "running": {
                    "summary": "Running task",
                    "value": {
                      "output": {
                        "task_id": "cgt-2025******-****",
                        "task_status": "Running",
                        "submit_time": 1795162540
                      },
                      "usage": {
                        "prompt_tokens": 0,
                        "completion_tokens": 0,
                        "total_tokens": 0
                      },
                      "request_id": ""
                    }
                  },
                  "success": {
                    "summary": "Successful task",
                    "value": {
                      "output": {
                        "task_id": "cgt-2025******-****",
                        "task_status": "Success",
                        "urls": [
                          "https://ark-content-generation-cn-beijing.tos-cn-beijing.volces.com/doubao-seed3d-2-0/xxx.zip?X-Tos-Signature=xxx"
                        ],
                        "submit_time": 1795162540,
                        "finish_time": 1795163260
                      },
                      "usage": {
                        "prompt_tokens": 0,
                        "completion_tokens": 30000,
                        "total_tokens": 30000
                      },
                      "request_id": ""
                    }
                  },
                  "failure": {
                    "summary": "Failed task (no charge)",
                    "value": {
                      "output": {
                        "task_id": "cgt-2025******-****",
                        "task_status": "Failure",
                        "submit_time": 1795161405,
                        "finish_time": 1795161465,
                        "error_message": "code: InvalidParameter, message: 当前图片不可用，请更换其他图片"
                      },
                      "usage": {
                        "prompt_tokens": 0,
                        "completion_tokens": 0,
                        "total_tokens": 0
                      },
                      "request_id": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid task ID or permission denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/cancel": {
      "get": {
        "tags": [
          "Doubao Seed3D 2.0"
        ],
        "operationId": "cancelDoubaoSeed3DTask",
        "summary": "Cancel a Queued Seed3D Task",
        "description": "This endpoint only cancels queued tasks; it does not provide task deletion. Requests are handled according to the ModelVerse task status:\n\n| Current Status | Action | Notes |\n|---|---|---|\n| Pending | Cancel task | Calls the upstream cancellation endpoint; no charge |\n| Running | Rejected | Returns 409; running tasks cannot be cancelled |\n| Success / Failure / Expired | Rejected | Returns 409; the task is not deleted and its status remains unchanged |\n| Cancelled | Idempotent success | No additional upstream call |\n\n**Note**: Successful tasks cannot be deleted through this endpoint. Task records are retained for 7 days.\n",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "The ID of the queued task to cancel.",
            "schema": {
              "type": "string"
            },
            "example": "cgt-2025******-****"
          }
        ],
        "responses": {
          "200": {
            "description": "Cancellation succeeded, or the task was already cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DCancelResponse"
                },
                "examples": {
                  "cancelled": {
                    "summary": "Cancelled",
                    "value": {
                      "id": "cgt-2025******-****",
                      "deleted": true,
                      "object": "video.deleted"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The task is not Pending and cannot be cancelled. Running and finished tasks are not deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Seed3DErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Include `Authorization: Bearer {your_api_key}` in the request header."
      }
    },
    "schemas": {
      "Seed3DSubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "doubao-seed3d-2-0-260328",
            "description": "Model ID, fixed as `doubao-seed3d-2-0-260328`."
          },
          "input": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "content"
            ],
            "properties": {
              "content": {
                "type": "array",
                "minItems": 1,
                "description": "Input content array. Must include exactly 1 image (`type: image_url`). Optionally include text parameters (`type: text`).\n\n**Image** (required): Pass exactly 1 image via `type: image_url`.\n\n**Text parameters** (optional): Specify the output file format and polygon count level via `type: text` (weak validation), e.g. `--subdivisionlevel medium --fileformat obj`. Only `subdivisionlevel` and `fileformat` are supported; natural language prompts are not supported.\n",
                "items": {
                  "$ref": "#/components/schemas/Seed3DContentItem"
                }
              }
            }
          }
        }
      },
      "Seed3DContentItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_url",
              "text"
            ],
            "description": "Content type:\n- `image_url`: Image input (required, exactly 1)\n- `text`: Text parameters (optional), for specifying output format and polygon count level\n"
          },
          "image_url": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "url"
            ],
            "description": "Required when `type` is `image_url`.",
            "properties": {
              "url": {
                "type": "string",
                "description": "Image address. Supports two formats:\n- Public URL: `https://example.com/image.jpg`\n- Base64 Data URL: `data:image/jpeg;base64,<Base64 encoded>`\n\nImage dimensions must be within [300, 6000] px. Clear photos of real objects are recommended.\n"
              }
            }
          },
          "text": {
            "type": "string",
            "description": "Required when `type` is `text`. Specifies the output file format and polygon count level.\n\nThe following parameters are supported; separate multiple parameters with spaces:\n\n- `--fileformat`: Output file format. One of `glb`, `obj`, `usd`, `usdz`. Default is `glb`.\n- `--subdivisionlevel`: Polygon count level. One of `high`, `medium`, `low`. Default is `medium`.\n  - `high`: ~1M faces\n  - `medium`: ~500K faces\n  - `low`: ~100K faces\n\nExample: `--subdivisionlevel medium --fileformat obj`\n\nNatural language prompts are not supported. Invalid parameters are silently ignored (weak validation).\n"
          }
        }
      },
      "Seed3DSubmitResponse": {
        "type": "object",
        "properties": {
          "output": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string",
                "description": "Task ID for subsequent queries and cancellation."
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Request trace ID."
          }
        }
      },
      "Seed3DStatusResponse": {
        "type": "object",
        "properties": {
          "output": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string"
              },
              "task_status": {
                "type": "string",
                "enum": [
                  "Pending",
                  "Running",
                  "Success",
                  "Failure",
                  "Cancelled",
                  "Expired"
                ],
                "description": "Task status."
              },
              "urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                },
                "description": "Download URL for the 3D model file (zip) on success. Valid for 24 hours."
              },
              "submit_time": {
                "type": "integer",
                "format": "int64",
                "description": "Task submission time (Unix timestamp)."
              },
              "finish_time": {
                "type": "integer",
                "format": "int64",
                "description": "Task completion time (Unix timestamp)."
              },
              "error_message": {
                "type": "string",
                "description": "Error message on failure."
              }
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "Input tokens, always 0."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "Output tokens. The token count consumed on success."
              },
              "total_tokens": {
                "type": "integer",
                "description": "Total tokens."
              }
            }
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "Seed3DCancelResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Task ID."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the cancellation succeeded. Also true for an idempotent request on an already-cancelled task."
          },
          "object": {
            "type": "string",
            "description": "Always `video.deleted`. This legacy response identifier is retained for compatibility and does not indicate deletion of the task record."
          }
        }
      },
      "Seed3DErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error description."
              },
              "type": {
                "type": "string",
                "description": "Error type."
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Error code."
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The parameter that caused the error."
              },
              "trace_id": {
                "type": "string",
                "description": "Request trace ID."
              }
            }
          }
        }
      }
    }
  }
}
```
