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

# 获取图像详情

> 查询图像生成或编辑任务的状态和结果。

### 状态描述

* 0: 生成中 - 任务正在处理
* 1: 成功 - 任务成功完成
* 2: 创建任务失败 - 创建任务失败
* 3: 生成失败 - 任务创建成功但生成失败

### 重要说明

* 生成的图像（resultImageUrl）将保存 14 天


## OpenAPI

````yaml cn/flux-kontext-api/flux-kontext-api-cn.json get /api/v1/flux/kontext/record-info
openapi: 3.0.0
info:
  title: Flux Kontext API
  description: fluxapi.ai Flux Kontext API 文档 - 文本生成图像和图像编辑 API
  version: 1.0.0
  contact:
    name: 技术支持
    email: support@fluxapi.ai
servers:
  - url: https://api.fluxapi.ai
    description: API 服务器
security:
  - BearerAuth: []
paths:
  /api/v1/flux/kontext/record-info:
    get:
      summary: 获取图像详情
      description: |-
        查询图像生成或编辑任务的状态和结果。

        ### 状态描述
        - 0: 生成中 - 任务正在处理
        - 1: 成功 - 任务成功完成
        - 2: 创建任务失败 - 创建任务失败
        - 3: 生成失败 - 任务创建成功但生成失败

        ### 重要说明
        - 生成的图像（resultImageUrl）将保存 14 天
      operationId: get-image-details
      parameters:
        - in: query
          name: taskId
          description: 图像生成任务的唯一标识符
          required: true
          schema:
            type: string
          example: task12345
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      code:
                        type: integer
                        enum:
                          - 200
                          - 401
                          - 404
                          - 422
                          - 429
                          - 455
                          - 500
                          - 501
                        description: |-
                          响应状态码

                          - **200**: 成功 - 请求已成功处理
                          - **401**: 未授权 - 认证凭据缺失或无效
                          - **404**: 未找到 - 请求的资源或端点不存在
                          - **422**: 验证错误 - 请求参数验证失败
                          - **429**: 请求限制 - 已超过该资源的请求限制
                          - **455**: 服务不可用 - 系统正在进行维护
                          - **500**: 服务器错误 - 处理请求时发生意外错误
                          - **501**: 生成失败 - 图像生成任务失败
                      msg:
                        type: string
                        description: 当 code != 200 时的错误信息
                        example: success
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          taskId:
                            type: string
                            description: 图像生成任务的唯一标识符
                            example: task12345
                          paramJson:
                            type: string
                            description: JSON 格式的请求参数
                            example: >-
                              {"prompt":"A serene mountain
                              landscape","aspectRatio":"16:9"}
                          completeTime:
                            type: string
                            format: date-time
                            description: 任务完成时间
                            example: '2024-03-20T10:30:00Z'
                          response:
                            type: object
                            description: 最终结果
                            properties:
                              originImageUrl:
                                type: string
                                description: 原始图像 URL（有效期为 10 分钟）
                                example: https://example.com/original.jpg
                              resultImageUrl:
                                type: string
                                description: 生成图像在我们服务器上的 URL
                                example: https://example.com/result.jpg
                          successFlag:
                            type: integer
                            description: 生成状态标志
                            enum:
                              - 0
                              - 1
                              - 2
                              - 3
                            example: 1
                          errorCode:
                            type: integer
                            description: |-
                              任务失败时的错误代码

                              - **400**: 您的提示词被网站标记为违反内容政策
                              - **500**: 内部错误，请稍后重试
                              安全容忍级别超出范围，应为 0-2 或 0-6
                              - **501**: 图像生成任务失败
                            enum:
                              - 400
                              - 500
                              - 501
                            example: null
                          errorMessage:
                            type: string
                            description: 任务失败时的错误消息
                            example: ''
                          createTime:
                            type: string
                            format: date-time
                            description: 任务创建时间
                            example: '2024-03-20T10:25:00Z'
              example:
                code: 200
                msg: success
                data:
                  taskId: task12345
                  paramJson: >-
                    {"prompt":"A serene mountain
                    landscape","aspectRatio":"16:9"}
                  completeTime: '2024-03-20T10:30:00Z'
                  response:
                    originImageUrl: https://example.com/original.jpg
                    resultImageUrl: https://example.com/result.jpg
                  successFlag: 1
                  errorCode: null
                  errorMessage: ''
                  createTime: '2024-03-20T10:25:00Z'
        '500':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: 服务器错误
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |-
        所有 API 都需要通过 Bearer Token 进行认证。

        获取 API Key：
        1. 访问 [API Key 管理页面](https://fluxapi.ai/api-key) 获取您的 API Key

        使用方法：
        添加到请求头：
        Authorization: Bearer YOUR_API_KEY

        注意：
        - 请妥善保管您的 API Key，不要与他人分享
        - 如果您怀疑 API Key 已泄露，请立即在管理页面重置

````