> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Send API requests to https://api.ttapi.io with the TT-API-KEY header. Midjourney account hosting uses https://hold.ttapi.io. Claude Code uses https://cc.ttapi.io.
> Most generation endpoints are asynchronous. The submit response returns a job id. Poll that product's fetch endpoint, or pass a webhook on the submit request. A fetch call does not start a new generation.
> 1 USD = 100 quota. Check the pricing page for that product before estimating cost.
> This file lists the English docs. Follow every /_llms/ link recursively for the API reference, Chinese, and Russian. Open a page's .md URL for the endpoint schema.

# 交互编辑

> 交互编辑 - 提交异步图片生成任务，返回 id

这是 **Seedream 图片生成 API** 的交互编辑接口。通过坐标、框选、箭头等方式指定编辑位置，精准编辑图片。仅 Seedream 5.0 pro / flash 支持。提交异步任务后返回 `id`，需通过查询接口获取结果。

**使用方式**：在 `prompt` 中描述编辑意图，可使用坐标、框选、手绘草图等方式指定编辑区域。


## OpenAPI

````yaml openapi/cn/seedream-interactive-edit.json POST /sd/api/v3/images/generations/tasks
openapi: 3.1.0
info:
  title: Seedream - 交互编辑
  version: 1.0.0
  description: Seedream 交互编辑接口 - 通过坐标、框选、箭头等方式精准编辑图片。仅 Seedream 5.0 pro / flash 支持。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /sd/api/v3/images/generations/tasks:
    post:
      description: 交互编辑 - 提交异步图片生成任务，返回 id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InteractiveEditRequest'
            example:
              model: doubao-seedream-5-0-pro-260628
              prompt: 将人物的帽子改为红色 <bbox>(0.3, 0.1, 0.7, 0.3)
              image: https://example.com/photo.jpg
              watermark: false
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: PENDING_QUEUE
                    description: 任务状态
                  message:
                    type: string
                    example: success
                  id:
                    type: string
                    description: 任务 ID
                    example: 30d9b07d-7349-4cbc-8e11-9ba302c6d165
                required:
                  - status
                  - message
                  - id
      security:
        - CustomApiKey: []
components:
  schemas:
    InteractiveEditRequest:
      type: object
      description: 交互编辑请求参数
      properties:
        model:
          type: string
          description: 模型名称。
          enum:
            - doubao-seedream-5-0-pro-260628
            - doubao-seedream-5-0-flash-260915
        prompt:
          type: string
          description: 文本提示词，描述编辑意图，可使用坐标、框选等方式指定编辑区域。
        image:
          type: string
          description: 待编辑的图片 URL。
        size:
          type: string
          description: 图像尺寸。5.0 pro/flash 可选：1K、1.5K、2K（默认 2K），或指定像素值。
          default: 2K
          enum:
            - 1K
            - 1.5K
            - 2K
        output_format:
          type: string
          description: 输出图像格式。
          default: jpeg
          enum:
            - png
            - jpeg
        response_format:
          type: string
          description: 返回格式。
          default: url
          enum:
            - url
            - b64_json
        watermark:
          type: boolean
          description: 是否添加水印。true=右下角显示「AI 生成」，false=不添加。
          default: true
          enum:
            - true
            - false
          example: false
        optimize_prompt_options:
          type: object
          description: 提示词优化配置
          properties:
            mode:
              type: string
              enum:
                - standard
                - fast
              default: standard
              description: 优化模式。standard=标准模式（质量更高，耗时较长），fast=快速模式（耗时更短，效果略低，5.0 flash 不支持）
        execution_expires_after:
          type: integer
          default: 172800
          description: 任务超时阈值（秒）。范围 [3600, 259200]（1~72 小时），默认 172800（48 小时）
        priority:
          type: integer
          default: 0
          description: 执行优先级。范围 [0, 9]，数值越大优先级越高，默认 0（FIFO）
        safety_identifier:
          type: string
          description: 终端用户唯一标识符，不超过 64 字符。建议传入哈希处理后的字符串
      required:
        - model
        - prompt
        - image
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.