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

# 提交通用插件任务

> 通过旧通用入口提交插件规范化 JSON 请求。

`POST /v1/tasks/{key}`

路径 `key` 是已启用插件 key；JSON 必须含 `model`，其他字段为插件的规范化请求格式。不是任意供应商原生 body 的透明转发。

返回 `id`、`task_id`、`status=queued`、`model`、`created_at`。该回执不表示最终状态；使用 `task_id` 查询。该入口是旧通用模式，优先选宿主协议或插件原生入口。无统一幂等或重发保证。见[任务指南](/zh/guides/tasks)。

[Read in English](/en/api-reference/tasks-submit)


## OpenAPI

````yaml openapi/relay.json POST /v1/tasks/{key}
openapi: 3.0.3
info:
  title: API — Core inference API
  version: 0.5.0
  description: >-
    面向接入的精选规范，不是全部管理或供应商接口。 / Curated integration specification, not the entire
    management or provider API.
  license:
    name: AGPL-3.0-or-later
servers:
  - url: https://gateway.example.com
    description: >-
      Example only; replace with your gateway origin and optional path prefix,
      without /v1.
security:
  - BearerAuth: []
paths:
  /v1/tasks/{key}:
    post:
      summary: 提交通用插件任务 / Submit a generic plugin task
      description: >-
        路径 `key` 是已启用插件 key；JSON 必须含 `model`，其他字段为插件的规范化请求格式。不是任意供应商原生 body
        的透明转发。 / Path `key` is an enabled plugin key. JSON requires `model`;
        other fields follow the plugin normalized request format, not arbitrary
        native provider payloads.
      operationId: tasks_submit
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
              additionalProperties: true
              required:
                - model
      responses:
        '200':
          description: >-
            读取业务字段，不只检查 HTTP 状态 / Validate business fields, not only HTTP
            status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  task_id:
                    type: string
                  status:
                    type: string
                  model:
                    type: string
                  created_at:
                    type: integer
                additionalProperties: true
                required:
                  - id
                  - task_id
                  - status
              example:
                id: task_example
                task_id: task_example
                status: queued
                model: YOUR_MODEL_ID
                created_at: 1700000000
        default:
          description: 错误格式与状态取决于入口 / Error status and shape depend on the entry.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 模型调用 API Key，不是控制台登录凭据 / Model API key, not console login credentials

````

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