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

# 高清

> 提升来源图片清晰度；操作类型与源版本必须兼容。 所有字段均通过JSON传入；不支持callback。成功提交返回原始任务id，使用GET /v1/tob/job/{jobId}轮询结果。

完整流程、参数组合与轮询示例见 [Midjourney 图片生成与编辑示例](/api-reference/examples/images/midjourney)。


## OpenAPI

````yaml api-reference/youchuan-openapi.json POST /v1/tob/upscale
openapi: 3.1.0
info:
  title: TokenOPS 悠船 MJ 图片 API
  version: 1.0.0
  description: >-
    Midjourney 图片生成、任务查询与编辑接口。使用 Bearer 鉴权；直接生成请求指定
    model，二次编辑使用来源任务的模型；通过轮询获取结果。
servers:
  - url: https://model-api.skyengine.com.cn
    description: 平台API地址；模型须已开通。
security:
  - bearerAuth: []
tags:
  - name: 悠船 MJ 图片
paths:
  /v1/tob/upscale:
    post:
      tags:
        - 悠船 MJ 图片
      summary: 高清
      description: >-
        提升来源图片清晰度；操作类型与源版本必须兼容。 所有字段均通过JSON传入；不支持callback。成功提交返回原始任务id，使用GET
        /v1/tob/job/{jobId}轮询结果。
      operationId: youchuanUpscale
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YouchuanUpscaleRequest'
            example:
              jobId: <source_job_id>
              imageNo: 0
              type: 0
      responses:
        '200':
          description: 任务已受理；也可能直接返回终态。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouchuanJob'
              example:
                id: <job_id>
                status: 1
                urls: []
                comment: 执行中
        '400':
          description: 参数、来源任务或接口不符合要求。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouchuanError'
              example:
                error:
                  code: 2004
                  message: unsupported field "callback"
        '401':
          description: 认证失败。
        '403':
          description: 无访问权限。
        '424':
          description: 下游调用不可用；拿到任务id后应继续查询原任务。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouchuanError'
              example:
                error:
                  code: 2002
                  message: Youchuan submit failed
        '429':
          description: 请求或任务并发达到限制。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouchuanError'
              example:
                error:
                  code: 2007
                  message: too many active image jobs
        '500':
          description: 请求未成功完成；如已获得id，应查询原任务而不是重复提交。
components:
  schemas:
    YouchuanUpscaleRequest:
      type: object
      additionalProperties: false
      required:
        - jobId
        - imageNo
        - type
      properties:
        jobId:
          type: string
          minLength: 1
          description: 来源任务 id；使用与提交来源任务相同的平台 API Key。
          example: <source_job_id>
        imageNo:
          type: integer
          minimum: 0
          maximum: 3
          description: 来源 urls 的图片下标，当前允许0～3。
          example: 0
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: 0标准；1创意；2/3仅用于V5任务的2倍/4倍高清。
    YouchuanJob:
      type: object
      required:
        - id
        - status
        - urls
        - comment
      properties:
        id:
          type: string
          description: 原始任务ID。后续编辑作为jobId，查询作为路径参数。
        text:
          type: string
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: 0等待；1执行中；2成功；3失败。
        urls:
          type:
            - array
            - 'null'
          items:
            type: string
            format: uri
          description: 成功后的图片地址；等待中通常为空。
        comment:
          type: string
          description: 状态说明或任务失败原因。
        cost:
          type:
            - object
            - 'null'
          properties:
            jobId:
              type: string
            feeCost:
              type:
                - integer
                - 'null'
            fastCost:
              type: number
            relaxCost:
              type: number
            costAt:
              type: string
          description: 上游任务消耗信息；完成前可能变化，不等同于平台钱包流水或最终实付账单。
        audits:
          type: array
          items:
            type: string
        seed:
          type: integer
    YouchuanError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
            trace_id:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 在 Authorization 请求头中传入 Bearer <API-KEY>。

````

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