图像识别
接口:POST /kling/v1/videos/image-recognize 归属:快手可灵(官方格式) 调用地址:Base URL https://api.allyang.cn(OpenAI 兼容前缀 https://api.allyang.cn/v1)+ 上述路径 鉴权:请求头 Authorization: Bearer <你的令牌>;令牌在控制台「令牌管理」创建 说明:下方为本接口契约。路径、字段名与枚举取值与线上接口一致;叙述文字已按本平台口径重写。价格、并发与限流等数值以控制台及实际返回为准,未确认处标注「待补」。
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/kling/v1/videos/image-recognize:
post:
summary: 图像识别
description: "上游文档链接已按合规要求移除;接口契约以本平台线上实测为准。"
tags:
- 快手可灵(官方格式)
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
default: Bearer {{YOUR_API_KEY}}
requestBody:
content:
application/json:
schema:
type: object
properties:
video_id:
type: string
description: "可灵 AI 生成的视频 ID,与 video_url 二选一(不能都空、也不能都填);视频需在 30 天内生成且时长 3.0 秒至 20.0 秒。"
video_url:
type: string
description: "上传视频的获取链接,与 video_id 二选一,二者不能同时为空或同时有值。视频仅限 MP4/MOV,体积不超过 100M,分辨率 720p 或 1080p,时长 3.0 秒至 20.0 秒。"
example: ''
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: "错误码,含义见错误码对照表。"
message:
type: string
description: "错误信息。"
request_id:
type: string
description: "系统为每次调用分配的请求编号,便于追踪链路与定位故障。"
data:
type: object
properties:
task_id:
type: string
description: "任务 ID,由系统分配。"
task_status:
type: string
description: "任务所处阶段;取值 submitted(已提交)、processing(处理中)、succeed(成功)、failed(失败)。"
enum:
- submitted(已提交
- processing(处理中)
- succeed(成功)
- failed(失败)
created_at:
type: integer
description: "任务落库时刻,Unix 时间戳,单位毫秒。"
updated_at:
type: integer
description: "任务最近更新时刻,Unix 时间戳,单位毫秒。"
required:
- task_id
- updated_at
- created_at
- task_status
required:
- code
- message
- request_id
- data
example: |-
{
"code": 0, //错误码,取值含义见错误码对照表
"message": "string", //错误信息。
"request_id": "string", //系统为每次调用分配的请求编号,便于追踪链路与定位故障。
"data": {
"task_id": "string", //任务 ID,由系统分配。
"task_info": { //任务创建时的参数信息
"external_task_id": "string" //客户自定义任务ID
},
"task_status": "string", //任务所处阶段;取值 submitted(已提交)、processing(处理中)、succeed(成功)、failed(失败)。
"created_at": 1722769557708, //任务落库时刻,Unix 时间戳,单位毫秒。
"updated_at": 1722769557708 //任务最近更新时刻,Unix 时间戳,单位毫秒。
}
}
headers: {}
security: []
components:
schemas: {}
securitySchemes: {}
servers: []
security: []