| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| start_date | query | string | 否 | 时间戳(ms)开始时间 |
| end_date | query | string | 否 | 时间戳(ms)截止时间 |
返回示例
200 Response
{
"object": "list",
"total_usage": 695.9646
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » object | string | true | none | none | |
| » total_usage | number | true | none | 令牌用量 | total_usage /100 = 实际用量 |
无限额度 则查询结果是100000000返回示例
200 Response
{
"object": "billing_subscription",
"has_payment_method": true,
"soft_limit_usd": 5,
"hard_limit_usd": 5,
"system_hard_limit_usd": 5,
"access_until": 0
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » object | string | true | none | none | |
| » has_payment_method | boolean | true | none | none | |
| » soft_limit_usd | integer | true | none | none | |
| » hard_limit_usd | integer | true | none | none | |
| » system_hard_limit_usd | integer | true | none | none | |
| » access_until | integer | true | none | none |
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| X-Api-User | header | integer | 否 | 用户数字ID编号,可在网站个人中心查看 |
| Authorization | header | string | 否 | 系统访问令牌,可在网站个人中心获取 |
返回示例
200 Response
{
"data": {
"id": 1,
"username": "xx@qq.com",
"password": "",
"display_name": "xx",
"role": 10,
"status": 1,
"email": "xx@qq.com",
"github_id": "xxxooo",
"wechat_id": "",
"oidc_id": "",
"google_id": "10283048099857931806",
"verification_code": "",
"access_token": null,
"quota": 1867213653,
"used_quota": 597081489,
"request_count": 3427970,
"group": "default",
"can_use_self_group": false,
"aff_code": "xXxx",
"inviter_id": 0,
"aff_count": 2,
"aff_quota": 0,
"aff_history_quota": 500000,
"created_at": 0,
"last_login_at": 1746636191,
"last_login_ip": "138.116.11.42",
"deleted_at": null,
"group_ratio": 1,
"topup_ratio": 1
},
"message": "",
"success": true
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » data | object | true | none | none | |
| »» id | integer | true | none | none | |
| »» username | string | true | none | none | |
| »» password | string | true | none | none | |
| »» display_name | string | true | none | none | |
| »» role | integer | true | none | none | |
| »» status | integer | true | none | none | |
| string | true | none | none | ||
| »» github_id | string | true | none | none | |
| »» wechat_id | string | true | none | none | |
| »» oidc_id | string | true | none | none | |
| »» google_id | string | true | none | none | |
| »» verification_code | string | true | none | none | |
| »» access_token | null | true | none | none | |
| »» quota | integer | true | none | 剩余额度 | 该额度除以 500000 既为实际额度 |
| »» used_quota | integer | true | none | 已用额度 | 该额度除以 500000 既为实际额度 |
| »» request_count | integer | true | none | 总请求次数 | none |
| »» group | string | true | none | 用户分组 | none |
| »» can_use_self_group | boolean | true | none | none | |
| »» aff_code | string | true | none | Aff邀请ID | none |
| »» inviter_id | integer | true | none | none | |
| »» aff_count | integer | true | none | 邀请次数 | none |
| »» aff_quota | integer | true | none | 邀请奖励额度 | none |
| »» aff_history_quota | integer | true | none | 历史邀请奖励额度 | none |
| »» created_at | integer | true | none | none | |
| »» last_login_at | integer | true | none | none | |
| »» last_login_ip | string | true | none | none | |
| »» deleted_at | null | true | none | none | |
| »» group_ratio | integer | true | none | none | |
| »» topup_ratio | integer | true | none | none | |
| » message | string | true | none | none | |
| » success | boolean | true | none | none |
Body 请求参数
{
"model": "claude-3-5-sonnet-20240620",
"messages": [
{
"role": "user",
"content": "你好,你是?"
}
],
"max_tokens": 1688,
"temperature": 0.5,
"stream": false
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Content-Type | header | string | 是 | none | |
| body | body | object | 否 | none | |
| » model | body | string | 是 | 模型名称 | none |
| » messages | body | [object] | 是 | none | |
| »» role | body | string | 是 | 角色 user | none |
| »» content | body | [anyOf] | 是 | 展开查看所有组合 | 如果只有文字内容,可直接传string内容。 |
| »»» anonymous | body | object | 否 | 文本消息 | none |
| »»»» type | body | string | 是 | 文本类型 | none |
| »»»» text | body | string | 是 | 提示词 | none |
| »»» anonymous | body | object | 否 | 图片分析/PDF分析(base64格式) | none |
| »»»» type | body | string | 是 | 类型 | 图片分析或PDF分析 |
| »»»» source | body | object | 是 | 文件资源 | none |
| »»»»» type | body | string | 是 | 类型 | 请填写 base64 |
| »»»»» data | body | string | 否 | base64 | none |
| »»»»» media_type | body | string | 否 | 文件类型 | 例如:image/png application/pdf |
| »»»» cache_control | body | object | 否 | 缓存配置 | 如果上下文都需要用到PDF文件,可设置该参数 将pdf进行缓存。后续将会节省更多tokens。 |
| »»»»» type | body | string | 否 | 值为ephemeral | |
| »»» anonymous | body | object | 否 | 图片分析/PDF分析(url格式) | none |
| »»»» type | body | string | 是 | 类型 | 图片分析或PDF分析 |
| »»»» source | body | object | 是 | 文件资源 | none |
| »»»»» type | body | string | 是 | 类型 | 请填写 url |
| »»»»» url | body | string | 否 | 网络url | 更推荐使用base64方式,响应更快,url方式需下载图片再转base64,效率更慢。 |
| »»»» cache_control | body | object | 否 | 缓存配置 | 如果上下文都需要用到PDF文件,可设置该参数 将pdf进行缓存。后续将会节省更多tokens。 |
| »»»»» type | body | string | 否 | 值为ephemeral | |
| » temperature | body | number | 否 | 温度 | 使用什么采样温度,介于 0 和 2 之间。较高的值(如 0.8)将使输出更加随机,而较低的值(如 0.2)将使输出更加集中和确定。 我们通常建议改变这个或top_p但不是两者同时使用。 |
| » top_p | body | number | 否 | 一种替代温度采样的方法,称为核采样,其中模型考虑具有 top_p 概率质量的标记的结果。所以 0.1 意味着只考虑构成前 10% 概率质量的标记。 我们通常建议改变这个或temperature但不是两者同时使用。 | |
| » max_tokens | body | number | 否 | 最大回复 | 聊天完成时生成的最大Tokens数量。 输入标记和生成标记的总长度受模型上下文长度的限制。 |
| » stream | body | boolean | 否 | 流式输出 | 流式输出或非流式输出 |
| » top_k | body | integer | 否 | none | |
| » tools | body | object | 否 | 函数调用 | tools函数详细参数与用法,请阅读 官方文档 |
| » thinking | body | object | 否 | 开启思考 | 该参数仅支持模型claude-3-7-sonnet-20250219 |
| »» type | body | string | 是 | 类型 | 值必须为 "enabled" |
| »» budget_tokens | body | integer | 是 | 最大思考 | 最大思考tokens,必须大于1024,同时 max_tokens参数必须大于此处的值。 |
claude-3-7-sonnet-20250219| 属性 | 值 |
|---|---|
| »»»» type | image |
| »»»» type | document |
| »»»» type | image |
| »»»» type | document |
返回示例
200 Response
{
"id": "msg_014AoBefsejHUjbdRntn7euw",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "你好!很高兴见到你。今天过得怎么样?有什么我可以帮助你的吗?"
}
],
"model": "claude-3-5-sonnet-20240620",
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 12,
"output_tokens": 38
}
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » id | string | true | none | none | |
| » type | string | true | none | none | |
| » role | string | true | none | none | |
| » content | [object] | true | none | none | |
| »» type | string | false | none | none | |
| »» text | string | false | none | none | |
| » model | string | true | none | none | |
| » stop_reason | string | true | none | none | |
| » stop_sequence | null | true | none | none | |
| » usage | object | true | none | none | |
| »» input_tokens | integer | true | none | none | |
| »» output_tokens | integer | true | none | none |
/v1/chat/completions 接口。走原生格式则使用本接口。Body 请求参数
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "你好,你是谁?"
}
]
}
],
"generationConfig": {
"temperature": 1.0,
"maxOutputTokens": 2048
}
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Content-Type | header | string | 是 | application/json | |
| model | path | string | 是 | 模型名称 | 路径中的模型名称,例如 gemini-2.5-flash-preview-05-20 |
| body | body | object | 是 | none | |
| » contents | body | [object] | 是 | 对话内容 | 当前对话内容,支持多轮对话 |
| »» role | body | string | 是 | 角色 | user 或 model |
| »» parts | body | [object] | 是 | 内容部分 | 消息的内容部分 |
| »»» text | body | string | 否 | 文本 | 文本内容 |
| »»» inlineData | body | object | 否 | 内联数据 | 用于传递图片/音频等多模态数据 |
| »»»» mimeType | body | string | 是 | MIME类型 | 例如 image/jpeg、image/png、application/pdf |
| »»»» data | body | string | 是 | Base64数据 | 文件的base64编码数据 |
| » generationConfig | body | object | 否 | 生成配置 | 模型生成参数配置 |
| »» temperature | body | number | 否 | 温度 | 采样温度,建议使用默认值 1.0 |
| »» topP | body | number | 否 | 核采样参数 | |
| »» topK | body | integer | 否 | Top-K采样参数 | |
| »» maxOutputTokens | body | integer | 否 | 最大输出tokens | 生成内容的最大token数 |
| »» responseMimeType | body | string | 否 | 响应类型 | 指定输出格式,例如 application/json 可输出JSON结构化内容 |
| »» responseJsonSchema | body | object | 否 | JSON Schema | 配合 responseMimeType 为 application/json 使用,定义输出的JSON结构 |
| »» thinkingConfig | body | object | 否 | 思考配置 | 控制模型的推理深度(仅Gemini 3系列支持) |
| »»» thinkingLevel | body | string | 否 | 思考等级 | 可选值:minimal、low、medium、high(默认) |
| » systemInstruction | body | object | 否 | 系统指令 | 开发者设置的系统提示词 |
| »» parts | body | [object] | 是 | none | |
| »»» text | body | string | 是 | 系统提示 | 系统指令文本内容 |
| » safetySettings | body | [object] | 否 | 安全设置 | 内容安全过滤配置 |
| »» category | body | string | 是 | 类别 | 安全类别,例如 HARM_CATEGORY_SEXUALLY_EXPLICIT |
| »» threshold | body | string | 是 | 阈值 | 过滤阈值,例如 BLOCK_NONE |
| » tools | body | [object] | 否 | 工具 | 工具配置,支持函数调用、代码执行等 |
返回示例
200 Response
{
"candidates": [
{
"content": {
"parts": [
{
"text": "你好!我是 Gemini,由 Google 开发的大型语言模型。"
}
],
"role": "model"
},
"finishReason": "STOP",
"safetyRatings": [
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE"
}
]
}
],
"usageMetadata": {
"promptTokenCount": 5,
"candidatesTokenCount": 20,
"totalTokenCount": 25
},
"modelVersion": "gemini-2.5-flash-preview-05-20"
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » candidates | [object] | true | none | 候选回复 | 模型生成的候选回复列表 |
| »» content | object | true | none | 内容 | 回复内容 |
| »»» parts | [object] | true | none | 内容部分 | none |
| »»»» text | string | false | none | 文本 | 模型生成的文本 |
| »»» role | string | true | none | 角色 | 始终为 model |
| »» finishReason | string | true | none | 结束原因 | 生成结束的原因,例如 STOP、MAX_TOKENS、SAFETY |
| »» safetyRatings | [object] | false | none | 安全评级 | 内容安全评级 |
| » usageMetadata | object | true | none | 用量信息 | Token用量统计 |
| »» promptTokenCount | integer | true | none | 输入tokens | 输入的token数量 |
| »» candidatesTokenCount | integer | true | none | 输出tokens | 输出的token数量 |
| »» totalTokenCount | integer | true | none | 总tokens | 总token数量 |
| » modelVersion | string | false | none | 模型版本 | 使用的模型版本 |
generateContent 完全一致,区别在于::streamGenerateContent 替代 :generateContentalt=sse 以获得SSE格式的流式响应Body 请求参数
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "写一首关于春天的诗"
}
]
}
],
"generationConfig": {
"temperature": 1.0,
"maxOutputTokens": 2048
}
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Content-Type | header | string | 是 | application/json | |
| model | path | string | 是 | 模型名称 | 路径中的模型名称,例如 gemini-2.5-flash-preview-05-20 |
| alt | query | string | 是 | 响应格式 | 必须为 sse,表示使用 Server-Sent Events 流式传输 |
| body | body | object | 是 | 请求体与 generateContent 接口完全一致,参数详见上方 |
generateContent 完全一致,请参考上方参数表。返回示例
200 Response(SSE流式)
GenerateContentResponse 对象:data: {"candidates":[{"content":{"parts":[{"text":"春"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":5,"candidatesTokenCount":1,"totalTokenCount":6}}
data: {"candidates":[{"content":{"parts":[{"text":"风拂面"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":5,"candidatesTokenCount":3,"totalTokenCount":8}}
data: {"candidates":[{"content":{"parts":[{"text":"花开满园"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":5,"candidatesTokenCount":15,"totalTokenCount":20}}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | SSE流式返回,每个事件包含一个GenerateContentResponse对象 | Inline |
generateContent 接口返回结构一致,每个SSE事件(data:)中包含一个完整的 GenerateContentResponse 对象。最后一个事件中的 finishReason 字段标识生成结束。Body 请求参数
{
"model": "gpt-4.1",
"input": "1+2 等于多少.",
"stream": false
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 是 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
{
"model": "text-embedding-3-large",
"input": "她长得非常漂亮,喜欢..."
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model | body | string | 是 | 模型名称 | 要使用的模型的 ID。您可以使用模型列表 |
| » input | body | string | 是 | 输入文本 | 输入文本以获取嵌入,编码为字符串或标记数组。要在单个请求中获取多个输入的嵌入,请传递一个字符串数组或令牌数组数组。每个输入的长度不得超过 8192 个标记。 |
返回示例
200 Response
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
-0.022425562,
-0.010263717,
0.022136442,
0.015323295,
-0.0013466021,
-0.009163808,
-0.025279038,
0.007510803,
-0.017573394,
-0.049326178,
0.025216186,
-0.012972634,
0.01647977,
0.025316749,
0.03813854,
-0.005716381,
-0.011501899,
-0.04020008,
0.0023978003,
-0.037761427,
-0.016064947,
0.029364413,
0.013664005,
0.035674743,
0.034442846,
-0.014506221,
0.014091398,
0.012488674,
-0.03167736,
-0.014506221,
-0.0009066388
]
}
],
"model": "text-embedding-3-large",
"usage": {
"prompt_tokens": 16,
"total_tokens": 16
}
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » object | string | true | none | none | |
| » data | [object] | true | none | none | |
| »» object | string | false | none | none | |
| »» index | integer | false | none | none | |
| »» embedding | [number] | false | none | none | |
| » model | string | true | none | none | |
| » usage | object | true | none | none | |
| »» prompt_tokens | integer | true | none | none | |
| »» total_tokens | integer | true | none | none |
Body 请求参数
{
"model_name": "kling-v1",
"prompt": "一只可爱的小狗在太空中开心的玩耍",
"negative_prompt": "模糊,低质量",
"duration": 5,
"aspect_ratio": "16:9",
"cfg_scale": 0.5,
"mode": "std",
"callback_url": "54.215.252.214:3000/kling/callback"
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model | body | string | 是 | none | |
| » prompt | body | string | 是 | none | |
| » negative_prompt | body | string | 是 | none | |
| » duration | body | integer | 是 | none | |
| » aspect_ratio | body | string | 是 | none | |
| » cfg_scale | body | number | 是 | none | |
| » mode | body | string | 是 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
{
"model_name": "kling-v1-6",
"prompt": "20岁的女生,瓜子脸,五官精致,鹅蛋脸,黑色长发,皮肤白暂,氛围光线,穿着一袭白色短裙,坐在街道旁边的长椅上,面带微笑,甩着头发",
"mode": "std",
"aspect_ratio": "1:1",
"duration": "5"
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model_name | body | string | 否 | 模型版本 | 注意:版本越高价格越高,v2.0的价格是v1的10倍,10秒为20倍价格。 |
| » prompt | body | string | 是 | 正向文本提示 | 不能超过2500个字符 |
| » negative_prompt | body | string | 否 | 负向文本提示 | 不能超过2500个字符 |
| » cfg_scale | body | number | 否 | 创意想象力 | 值越大,创意相关性越高,取值范围:[0,1] |
| » mode | body | string | 否 | 视频模式 | 注意 注意 注意:设置为 pro 模式 价格 * 3.5倍 |
| » camera_control | body | object | 否 | 运镜控制 | 控制摄像机运动方式,未指定则智能匹配 |
| »» type | body | string | 否 | 镜头类型 | 预定义的运镜类型 |
| »» config | body | object | 否 | 镜头配置 | 包含六个字段,用于指定摄像机在不同方向上的运动或变化 |
| »»» horizontal | body | integer | 否 | 水平运镜 | 取值范围:[-10, 10] |
| »»» vertical | body | integer | 否 | 垂直运镜 | 取值范围:[-10, 10] |
| »»» pan | body | integer | 否 | 水平摇镜 | 取值范围:[-10, 10] |
| »»» tit | body | integer | 否 | 垂直摇镜 | 取值范围:[-10, 10] |
| »»» roll | body | integer | 否 | 旋转运镜 | 取值范围:[-10, 10] |
| »»» zoom | body | integer | 否 | 变焦 | 取值范围:[-10, 10] |
| » aspect_ratio | body | string | 否 | 画面比例 | none |
| » duration | body | string | 否 | 视频时长(单位秒) | 注意 注意 注意:设置时长 10 价格 * 两倍 |
| » callback_url | body | string | 否 | 通知地址 | 本次任务结果回调通知地址,详见 CallBack协议 |
pro 模式 价格 * 3.5倍| 属性 | 值 |
|---|---|
| » model_name | kling-v1 |
| » model_name | kling-v1-5 |
| » model_name | kling-v1-6 |
| » model_name | kling-v2-master |
| » model_name | kling-v2-1-master |
| » model_name | kling-v2-5-turbo |
| » mode | std |
| » mode | pro |
| »» type | simple |
| »» type | down_back |
| »» type | forward_up |
| »» type | right_turn_forward |
| »» type | left_turn_forward |
| » aspect_ratio | 16:9 |
| » aspect_ratio | 9:16 |
| » aspect_ratio | 1:1 |
| » duration | 5 |
| » duration | 10 |
返回示例
200 Response
{
"code": 0,
"message": "SUCCEED",
"request_id": "CmYgjmbyMToAAAAAAF6svw",
"data": {
"task_id": "CmYgjmbyMToAAAAAAF6svw",
"task_status": "submitted",
"created_at": 1727338013674,
"updated_at": 1727338013674
}
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » message | string | true | none | none | |
| » data | object | true | none | none | |
| »» task_id | string | true | none | none | |
| »» action | string | true | none | none | |
| »» status | string | true | none | none | |
| »» fail_reason | string | true | none | none | |
| »» submit_time | integer | true | none | none | |
| »» start_time | integer | true | none | none | |
| »» finish_time | integer | true | none | none | |
| »» progress | string | true | none | none | |
| »» data | object | true | none | none | |
| »»» task_id | string | true | none | none | |
| »»» created_at | integer | true | none | none | |
| »»» updated_at | integer | true | none | none | |
| »»» task_result | object | true | none | none | |
| »»»» images | [object] | true | none | none | |
| »»»»» url | string | false | none | none | |
| »»»»» index | integer | false | none | none | |
| »»»» videos | null | true | none | none | |
| »»» task_status | string | true | none | none | |
| »»» task_status_msg | string | true | none | none | |
| »» created_at | integer | true | none | none | |
| »» updated_at | integer | true | none | none | |
| »» task_result | object | true | none | none | |
| »»» images | [object] | true | none | none | |
| »»»» url | string | false | none | none | |
| »»»» index | integer | false | none | none | |
| »»» videos | null | true | none | none | |
| »» task_status | string | true | none | none | |
| »» task_status_msg | string | true | none | none | |
| » request_id | string | true | none | none |
Body 请求参数
{
"image": "https://p2.a.kwimgs.com/bs2/upload-ylab-stunt/ai_portal/1731125871/6N0QrAnAeU/409-f054fa25c21a.png",
"prompt": "一位年轻的中国女性自信地走在一片广阔的绿色草地上,身边有一匹棕色的马,她的脸是用IPA或Ecomid技术创作的,展示了受顾柔软自然外表启发的高度实现的皮肤纹理,有微妙的皮肤缺陷,如淡淡的雀斑和浅色毛孔,以保持真实感,富有表现力的眼睛和柔软的嘴唇为她的表情增添了深度,她长长的黑发在风中自然流动,穿着米色连身裤,上面有可见的织物皱纹,黑色靴子略带灰尘,柔和的自然光线突出了她的脸,与她旁边马的精致皮毛纹理无缝融合,带有IC照明设置的电影构图增强了深度和真实感,鲜艳而自然的色彩,环境光散射在草地上,远处滚动蓝天下的山丘上有蓬松的白云,绿草上有微妙的纹理变化,微风中她头发和马尾的动态运动,以电影和纪录片风格编辑,强调现实主义,用50mm镜头、f/2.8光圈、超现实纹理、浅景深和散景背景拍摄",
"model": "kling-v1-5",
"mode": "std",
"duration": "5"
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model_name | body | string | 否 | 模型版本 | 注意v2-master大师版本 价格是v1.0的10~20倍 |
| » image | body | string | 是 | 参考图片 | 支持Base64编码或图片URL,支持.jpg / .jpeg / .png格式,大小不能超过10MB,分辨率不小于300*300px,图片宽高比要在1:2.5 ~ 2.5:1之间 |
| » image_tail | body | string | 否 | 参考图像 - 尾帧控制 | 支持Base64编码或图片URL,支持.jpg / .jpeg / .png格式,大小不能超过10MB,分辨率不小于300*300px,填写该参数后,mode参数只能设置为pro |
| » prompt | body | string | 否 | 正向文本提示 | 不能超过2500个字符 |
| » negative_prompt | body | string | 否 | 负向文本提示 | 不能超过2500个字符 |
| » cfg_scale | body | number | 否 | 创意想象力 | 值越大,创意相关性越高,取值范围:[0,1] |
| » mode | body | string | 否 | 视频质量模式 | 注意 注意 注意:设置为 pro 模式 价格 * 3.5倍 |
| » static_mask | body | string | 否 | 静态笔刷涂抹区域(用户通过运动笔刷涂抹的 mask 图片 | ● 支持传入图片Base64编码或图片URL (确保可访问,格式要求同 image 字段) |
| » dynamic_masks | body | [object] | 否 | 动态笔刷配置列表 | 可配置多组(最多6组),每组包含“涂抹区域 mask”与“运动轨迹 trajectories”序列 |
| »» mask | body | string | 否 | 动态笔刷涂抹区域(用户通过运动笔刷涂抹的 mask 图片) | |
| »» trajectories | body | [object] | 否 | 运动轨迹坐标序列 | |
| »»» x | body | string | 否 | 轨迹点横坐标 | (在像素二维坐标系下,以输入图片image左下为原点的像素坐标) |
| »»» y | body | string | 否 | 轨迹点纵坐标 | (在像素二维坐标系下,以输入图片image左下为原点的像素坐标) |
| » duration | body | string | 否 | 视频时长(单位秒) | 注意 注意 注意:设置时长 10 价格 * 两倍 |
| » callback_url | body | string | 否 | 通知地址 | 本次任务结果回调通知地址,详见 CallBack协议 |
| » camera_control | body | object | 否 | 运镜控制 | 控制摄像机运动方式,未指定则智能匹配 |
| »» type | body | string | 否 | 镜头类型 | simple:简单运镜,此类型下可在"config"中六选一进行运镜 |
| »» config | body | object | 否 | 镜头配置 | 包含六个字段,用于指定摄像机的运动或变化 |
| »»» horizontal | body | integer | 否 | 水平运镜 | 取值范围:[-10, 10] |
| »»» vertical | body | integer | 否 | 垂直运镜 | 取值范围:[-10, 10] |
| »»» pan | body | integer | 否 | 水平摇镜 | 取值范围:[-10, 10] |
| »»» tit | body | integer | 否 | 垂直摇镜 | 取值范围:[-10, 10] |
| »»» roll | body | integer | 否 | 旋转运镜 | 取值范围:[-10, 10] |
| »»» zoom | body | integer | 否 | 变焦 | 取值范围:[-10, 10] |
pro 模式 价格 * 3.5倍| 属性 | 值 |
|---|---|
| » model_name | kling-v1 |
| » model_name | kling-v1-5 |
| » model_name | kling-v1-6 |
| » model_name | kling-v2-master |
| » model_name | kling-v2-1 |
| » model_name | kling-v2-1-master |
| » model_name | kling-v2-5-turbo |
| » mode | std |
| » mode | pro |
| » duration | 5 |
| » duration | 10 |
| »» type | simple |
| »» type | down_back |
| »» type | forward_up |
| »» type | right_turn_forward |
| »» type | left_turn_forward |
返回示例
200 Response
{
"code": 0,
"message": "SUCCEED",
"request_id": "CmYgjmbyMToAAAAAAF6svw",
"data": {
"task_id": "CmYgjmbyMToAAAAAAF6svw",
"task_status": "submitted",
"created_at": 1727338013674,
"updated_at": 1727338013674
}
}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » message | string | true | none | none | |
| » data | object | true | none | none | |
| »» task_id | string | true | none | none | |
| »» action | string | true | none | none | |
| »» status | string | true | none | none | |
| »» fail_reason | string | true | none | none | |
| »» submit_time | integer | true | none | none | |
| »» start_time | integer | true | none | none | |
| »» finish_time | integer | true | none | none | |
| »» progress | string | true | none | none | |
| »» data | object | true | none | none | |
| »»» task_id | string | true | none | none | |
| »»» created_at | integer | true | none | none | |
| »»» updated_at | integer | true | none | none | |
| »»» task_result | object | true | none | none | |
| »»»» images | [object] | true | none | none | |
| »»»»» url | string | false | none | none | |
| »»»»» index | integer | false | none | none | |
| »»»» videos | null | true | none | none | |
| »»» task_status | string | true | none | none | |
| »»» task_status_msg | string | true | none | none | |
| »» created_at | integer | true | none | none | |
| »» updated_at | integer | true | none | none | |
| »» task_result | object | true | none | none | |
| »»» images | [object] | true | none | none | |
| »»»» url | string | false | none | none | |
| »»»» index | integer | false | none | none | |
| »»» videos | null | true | none | none | |
| »» task_status | string | true | none | none | |
| »» task_status_msg | string | true | none | none | |
| » request_id | string | true | none | none |
Body 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| model_name | query | string | 否 | none | |
| model | header | string | 是 | none | |
| body | body | object | 否 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| taskid | query | string | 是 | none | |
| body | body | object | 否 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
{
"model_name": "kling-v1-6",
"image_url": "https://www.shutterstock.com/zh/image-photo/man-snowboarding-on-snowy-hill-winter-1664714053",
"video_url": "https://v4-fdl.kechuangai.com/ksc2/JD23rTwLF8nO7HcBOKLLRbDN-br6305GeahJDUtregFeuisLQCj3m1DImibsFq8M9iL2cgwT-jOuAgnkluXRWZ6yuWTpYeOSlVjeUhl373SZ47o-kuy3D_tXtGsCjWJokwCIzQTDSBIFhD44dONlaxSCl7QJ8_ZqF6yvRtZxTCFDFftvW1t3-62CekzOpkIn-rf4mX22rshUP-8kXtXbzw.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAElaJUlOjUD4m17YeCp9JkbFEWK-HKkyQvL8GV6imdP4xfdfN9fNSyba54aoZfX3ZrBruMjyqgJltyhoD4T43l6z5mZoetKvWR-5ETx6DkUDlRCZpL8RN8uChcVDY0ehRBil6rUauFVx51mirGO5r4YEfpod2nln-qzIgsYdxoS0MdIrdsuxKI3L3B-ZgrSoWOa-nS413vOGA3gl8EWR2CHDALKY4qLTvpCNoqEAtaOiRoSu4b9SEvlSFLKC9ylAQ2baCJIIiAdZfzoK9ez0XjClG1V-E1Oa1QfECufBy3q6XYW-zSfUygFMAE&x-kcdn-pid=112757&pkey=AAV_WvQmJSKlCznk706zqmb-ljZ_XsWYNafu_qQxugjiEnIywg8feP7tRUfJ-5GPp3eJsw-JCDrQNSSB3Clc8VH1rCmPymt2djaoewbNeS-rm1fFc5WcP-N2bRnRQcyl_Yk",
"mode": "std",
"duration": 10,
"character_orientation": "video"
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model | body | string | 是 | none | |
| » image_url | body | string | 是 | none | |
| » video_url | body | string | 是 | none | |
| » mode | body | string | 是 | none | |
| » duration | body | integer | 是 | none | |
| » character_orientation | body | string | 是 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
{
"model_name": "kling-v1-6",
"element_name": "自定义主体-001",
"element_description": "自定义主体测试-001",
"element_frontal_image": "https://docs.qingque.cn/image/api/convert/loadimage?id=-8654991330408162800eZQDlFDacBuEmer7HQstW4wes&docId=eZQAl5y8xNSkr0iYUS8-bpGvP&identityId=2Oa28mncRIC&loadSource=true",
"element_refer_list": [
{
"image_url": "https://docs.qingque.cn/image/api/convert/loadimage?id=-8654991330408162800eZQDlFDacBuEmer7HQstW4wes&docId=eZQAl5y8xNSkr0iYUS8-bpGvP&identityId=2Oa28mncRIC&loadSource=true"
}
],
"tag_list": [
{
"tag_id": "o_101"
}
]
}| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| body | body | object | 否 | none | |
| » model | body | string | 是 | none | |
| » element_name | body | string | 是 | none | |
| » element_description | body | string | 是 | none | |
| » element_frontal_image | body | string | 是 | none | |
| » element_refer_list | body | [object] | 是 | none | |
| »» image_url | body | string | 否 | none | |
| » tag_list | body | [object] | 是 | none | |
| »» tag_id | body | string | 否 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| model_name | query | string | 是 | none | |
| body | body | object | 否 | none |
返回示例
200 Response
{}| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
Body 请求参数
{
"model_name": "kling-v1",
"voice_name": "