POST/api/public/v1/ingestions

ingestions.create

所需权限
ingestions:write
类别
写入
计费
按解析页数计
幂等
必须带 Idempotency-Key 请求头;同一个键重试时返回第一次的结果
MCP 工具
ingest_documents

参数

  • Idempotency-Key位置 header必填 是类型 string (uuid)

请求体

{
  "type": "object",
  "properties": {
    "documents": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fileIds": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "fileIds"
        ],
        "additionalProperties": false
      }
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "subject": {
      "type": "string",
      "enum": [
        "math",
        "physics",
        "informatics",
        "english",
        "biology",
        "geography",
        "chemistry",
        "chinese",
        "history",
        "politics"
      ]
    }
  },
  "required": [
    "documents"
  ],
  "additionalProperties": false
}

成功响应 202

{
  "type": "object",
  "properties": {
    "jobId": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "partially_succeeded",
        "needs_action",
        "cancelling",
        "cancelled"
      ]
    },
    "requestId": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "jobId",
    "status",
    "requestId"
  ],
  "additionalProperties": false
}

可能返回的错误状态码

400401403404409429500503

所有错误都用同一种错误信封返回,原因码见错误与限流。

POST /api/public/v1/ingestions · 接口参考