> ## 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.

# NovelAI 查询 API 文档

> 通过 NovelAI 结果查询 API 获取图像生成任务状态、结果地址和返回数据，方便对接异步图像生成流程。



## OpenAPI

````yaml openapi/cn/novel.json get /novelai/fetch
openapi: 3.1.0
info:
  title: Novel API DOCS
  version: 1.0.0
  description: TTAPI Novel AI API 接口服务
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /novelai/fetch:
    get:
      description: 通过jobId查询当前任务生成结果
      parameters:
        - name: jobId
          in: query
          required: true
          schema:
            type: string
          description: 生成的视频的jobId
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - PENDING_QUEUE
                      - ON_QUEUE
                      - SUCCESS
                      - FAILED
                  message:
                    type: string
                    description: 响应信息
                  jobId:
                    type: string
                    description: 任务id
                  data:
                    type: object
                    description: 任务结果
                    properties:
                      finishTime:
                        type: string
                        description: 完成时间
                      imageUrl:
                        type: string
                        description: 图片地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      prompt:
                        type: string
                        description: 提示词
                      quota:
                        type: string
                        description: 消耗配额
                      hookUrl:
                        type: string
                        description: 回调地址
                example:
                  data:
                    finishTime: '2026-02-12 09:09:11'
                    hookUrl: null
                    imageUrl:
                      - https://cdn.ttapi.io/xxx1.png
                      - https://cdn.ttapi.io/xxx2.png
                    prompt: >-
                      1 young woman, professional talent service specialist,
                      warm dark brown eyes, sleek black hair styled in a neat
                      shoulder-length straight bob with soft side-swept bangs,
                      wearing a tailored light blue blazer over a crisp white
                      silk blouse, navy blue slim-fit dress pants, a small
                      delicate silver wristwatch on the left wrist, a
                      professional ID badge clipped to the lapel, black leather
                      low-heeled pumps, gentle and approachable smile, friendly
                      and professional appearance,solo,face front,full
                      body,standing,full shot, white background, simple
                      background, simple shadow,masterpiece, best quality,very
                      aesthetic
                    quota: '4.00'
                  jobId: 3b178ca1-78ee-41c1-94d7-3464b27a2439
                  message: success
                  status: SUCCESS
                required:
                  - status
                  - message
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  responses:
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: 授权失败
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````