Appearance
UniAPI 文档。
Servers
https://api.uniai.io请求地址
文本生成音频
音频转文本
POST
/v1/audio/transcriptions
Authorizations
bearer
TypeHTTP (bearer)
Request Body
multipart/form-data
object
file
string
Required
要转录的音频文件对象(非文件名),格式为以下之一:flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav或webm。
Format
"binary"model
string
Required
使用模型的ID。选项有 gpt-4o-transcribe、gpt-4o-mini-transcribe 和 whisper-1
language
string
输入音频的语言。以ISO-639-1(例如en)格式提供输入语言将提高准确性和延迟。
prompt
string
可选文本,用于指导模型的风格或继续之前的音频片段。
response_format
string
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt. For gpt-4o-transcribe and gpt-4o-mini-transcribe, the only supported format is json.
Valid values
"json""text""srt""verbose_json""vtt"Default
"json"temperature
number
采样温度,介于0和1之间。更高的值,如0.8,会使输出更随机,而更低的值,如0.2,会使输出更集中和确定。如果设置为0,模型将使用对数概率自动增加温度,直到达到某些阈值。
Default
0include[]
string[]
附加信息,包括在转录响应中。
logprobs 将返回响应中标记的对数概率,以了解模型对转录的置信度。
logprobs 仅在将 response_format 设置为 json 时有效,并且仅与 gpt-4o-transcribe 和 gpt-4o-mini-transcribe 模型一起使用。
timestamp_granularities[]
string[]
此转录要填充的时间戳粒度。必须将response_format设置为verbose_json才能使用时间戳粒度。支持以下一个或两个选项:word或segment。注意:分段时间戳不会增加额外延迟,但生成单词时间戳会增加额外延迟。
Default
"segment"stream
boolean
Default
falseResponses
OK
application/json
{
"text": "string",
"logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
创建转录
POST
/v1/audio/translations
Authorizations
bearer
TypeHTTP (bearer)
Request Body
multipart/form-data
object
file
string
Required
音频文件对象(不是文件名)翻译,格式为以下之一:flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav 或 webm。
Format
"binary"model
string
Required
要使用的模型ID。目前仅提供whisper-1
prompt
string
一个可选的文本,用于指导模型的风格或继续之前的音频片段
response_format
string
输出格式,选项之一:json、text、srt、verbose_json 或 vtt。
Valid values
"json""text""srt""verbose_json""vtt"Default
"json"temperature
number
采样温度,介于0和1之间。较高的值如0.8会使输出更随机,而较低的值如0.2会使其更集中和确定。如果设置为0,模型将使用对数概率自动增加温度,直到达到某些阈值。
Default
0Responses
OK
application/json
{
"text": "string"
}
聊天接口
POST
/v1/chat/completions
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"metadata": {
"additionalProperties": "string"
},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"messages": [
{
"content": "string",
"role": "string",
"name": "string"
}
],
"model": "string",
"modalities": [
"string"
],
"reasoning_effort": "medium",
"max_completion_tokens": 0,
"frequency_penalty": 0,
"presence_penalty": 0,
"web_search_options": {
"user_location": {
"type": "string",
"approximate": {
"country": "string",
"region": "string",
"city": "string",
"timezone": "string"
}
},
"search_context_size": "medium"
},
"top_logprobs": 0,
"response_format": {
"type": "string"
},
"audio": {
"voice": "string",
"format": "string"
},
"store": false,
"stream": false,
"stop": "
",
"logit_bias": {
"additionalProperties": 0
},
"logprobs": false,
"max_tokens": 0,
"n": 1,
"prediction": {
"type": "string",
"content": "string"
},
"seed": 0,
"stream_options": {
"include_usage": true
},
"tools": [
{
"type": "string",
"function": {
"description": "string",
"name": "string",
"parameters": {
"additionalProperties": "string"
},
"strict": false
}
}
],
"tool_choice": "string",
"parallel_tool_calls": true,
"function_call": "string",
"functions": [
{
"description": "string",
"name": "string",
"parameters": {
"additionalProperties": "string"
}
}
]
}
Responses
OK
application/json
{
"id": "string",
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"content": "string",
"refusal": "string",
"tool_calls": [
{
"id": "string",
"type": "string",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"annotations": [
{
"type": "string",
"url_citation": {
"end_index": 0,
"start_index": 0,
"url": "string",
"title": "string"
}
}
],
"role": "string",
"function_call": {
"arguments": "string",
"name": "string"
},
"audio": {
"id": "string",
"expires_at": 0,
"data": "string",
"transcript": "string"
}
},
"logprobs": {
"content": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
],
"top_logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
],
"refusal": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
],
"top_logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
]
}
}
],
"created": 0,
"model": "string",
"service_tier": "auto",
"system_fingerprint": "string",
"object": "string",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
}
}
}
自动补全
POST
/v1/completions
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"model": "string",
"prompt": "This is a test.",
"best_of": 1,
"echo": false,
"frequency_penalty": 0,
"logit_bias": {
"additionalProperties": 0
},
"logprobs": null,
"max_tokens": 16,
"n": 1,
"presence_penalty": 0,
"seed": 0,
"stop": "
",
"stream": false,
"stream_options": {
"include_usage": true
},
"suffix": "test.",
"temperature": 1,
"top_p": 1,
"user": "user-1234"
}
Responses
OK
application/json
{
"id": "string",
"choices": [
{
"finish_reason": "string",
"index": 0,
"logprobs": {
"text_offset": [
0
],
"token_logprobs": [
0
],
"tokens": [
"string"
],
"top_logprobs": [
{
"additionalProperties": 0
}
]
},
"text": "string"
}
],
"created": 0,
"model": "string",
"system_fingerprint": "string",
"object": "string",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
}
}
}
向量接口
POST
/v1/embeddings
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"input": "This is a test.",
"model": "text-embedding-3-small",
"encoding_format": "float",
"dimensions": 0,
"user": "user-1234"
}
Responses
OK
application/json
{
"data": [
{
"index": 0,
"embedding": [
0
],
"object": "string"
}
],
"model": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}
图像编辑
POST
/v1/images/edits
Authorizations
bearer
TypeHTTP (bearer)
Request Body
multipart/form-data
object
image
string |array
Required
要编辑的图像。必须是支持的图像文件或图像数组。
对于 gpt-image-1,每个图像应为小于25MB的 png、webp 或 jpg 文件。您最多可以提供16张图像。
对于 dall-e-2,您只能提供一张图像,且应为小于4MB的正方形 png 文件。
prompt
string
Required
所需图像的文字描述。dall-e-2的最大长度为1000个字符,gpt-image-1的最大长度为32000个字符。
mask
string
一个额外的图像,其完全透明的区域(例如,alpha为零的地方)表示应编辑image的位置。如果提供了多个图像,掩码将应用于第一个图像。必须是有效的PNG文件,大小小于4MB,并且与image具有相同的尺寸。
Format
"binary"model
string
用于图像生成的模型。仅支持 dall-e-2 和 gpt-image-1。默认使用 dall-e-2,除非使用了特定于 gpt-image-1 的参数。
Default
"dall-e-2"n
integer
要生成的图像数量。必须在1到10之间。
Minimum
1Maximum
10Default
1size
string
生成图像的尺寸。对于 gpt-image-1,必须是 1024x1024、1536x1024(横向)、1024x1536(纵向)之一,或 auto(默认值);对于 dall-e-2,必须是 256x256、512x512 或 1024x1024 之一。
Valid values
"256x256""512x512""1024x1024""1536x1024""1024x1536""auto"Default
"1024x1024"response_format
string
生成的图像返回的格式。必须是 url 或 b64_json 之一。URL 在图像生成后仅有效 60 分钟。此参数仅支持 dall-e-2,因为 gpt-image-1 始终返回 base64 编码的图像。
Valid values
"url""b64_json"Default
"url"user
string
表示您的终端用户的唯一标识符,有助于 OpenAI 监控和检测滥用行为。
quality
string
将生成的图像质量。high、medium 和 low 仅支持 gpt-image-1。dall-e-2 仅支持 standard 质量。默认值为 auto。
Valid values
"standard""low""medium""high""auto"Default
"auto"Responses
OK
application/json
{
"created": 0,
"data": [
{
"b64_json": "string",
"url": "string",
"revised_prompt": "string"
}
],
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"text_tokens": 0,
"image_tokens": 0
}
}
}
图像生成
POST
/v1/images/generations
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"prompt": "A cute baby sea otter",
"model": "gpt-image-1",
"n": 1,
"quality": "medium",
"response_format": "url",
"output_format": "png",
"output_compression": 100,
"size": "1024x1024",
"moderation": "low",
"background": "transparent",
"style": "vivid"
}
Responses
OK
application/json
{
"created": 0,
"data": [
{
"b64_json": "string",
"url": "string",
"revised_prompt": "string"
}
],
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"text_tokens": 0,
"image_tokens": 0
}
}
}
图像变体
POST
/v1/images/variations
Authorizations
bearer
TypeHTTP (bearer)
Request Body
multipart/form-data
object
image
string
Required
用于变体的基础图像。必须是有效的PNG文件,大小小于4MB,且为正方形。
Format
"binary"model
string
用于图像生成的模型。目前仅支持 dall-e-2。
Default
"dall-e-2"n
integer
要生成的图像数量。必须在1到10之间。
Minimum
1Maximum
10Default
1response_format
string
返回生成的图像的格式。必须是 url 或 b64_json 之一。URL 仅在图像生成后 60 分钟内有效。
Valid values
"url""b64_json"Default
"url"size
string
生成的图像大小。必须是以下之一:256x256、512x512或1024x1024。
Valid values
"256x256""512x512""1024x1024"Default
"1024x1024"Responses
OK
application/json
{
"created": 0,
"data": [
{
"b64_json": "string",
"url": "string",
"revised_prompt": "string"
}
],
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"text_tokens": 0,
"image_tokens": 0
}
}
}
审核
POST
/v1/moderations
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"input": "I want to kill them.",
"model": "omni-moderation-2024-09-26"
}
Responses
OK
application/json
{
"id": "string",
"model": "string",
"results": [
{
"flagged": true,
"categories": {
"hate": true,
"hate/threatening": true,
"harassment": true,
"harassment/threatening": true,
"illicit": true,
"illicit/violent": true,
"self-harm": true,
"self-harm/intent": true,
"self-harm/instructions": true,
"sexual": true,
"sexual/minors": true,
"violence": true,
"violence/graphic": true
},
"category_scores": {
"hate": 0,
"hate/threatening": 0,
"harassment": 0,
"harassment/threatening": 0,
"illicit": 0,
"illicit/violent": 0,
"self-harm": 0,
"self-harm/intent": 0,
"self-harm/instructions": 0,
"sexual": 0,
"sexual/minors": 0,
"violence": 0,
"violence/graphic": 0
},
"category_applied_input_types": {
"hate": [
"string"
],
"hate/threatening": [
"string"
],
"harassment": [
"string"
],
"harassment/threatening": [
"string"
],
"illicit": [
"string"
],
"illicit/violent": [
"string"
],
"self-harm": [
"string"
],
"self-harm/intent": [
"string"
],
"self-harm/instructions": [
"string"
],
"sexual": [
"string"
],
"sexual/minors": [
"string"
],
"violence": [
"string"
],
"violence/graphic": [
"string"
]
}
}
]
}
response
POST
/v1/responses
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"metadata": {
"additionalProperties": "string"
},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "string",
"model": "string",
"reasoning": {
"effort": "medium",
"summary": "string",
"generate_summary": "string"
},
"max_output_tokens": 0,
"instructions": "string",
"text": {
"format": {
"type": "string"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"string"
],
"max_num_results": 0,
"ranking_options": {
"ranker": "string",
"score_threshold": 0
},
"filters": null
}
],
"tool_choice": "string",
"truncation": "disabled",
"input": "string",
"include": [
"string"
],
"parallel_tool_calls": true,
"store": true,
"stream": false
}
Responses
OK
application/json
{
"metadata": {
"additionalProperties": "string"
},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "string",
"model": "string",
"reasoning": {
"effort": "medium",
"summary": "string",
"generate_summary": "string"
},
"max_output_tokens": 0,
"instructions": "string",
"text": {
"format": {
"type": "string"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"string"
],
"max_num_results": 0,
"ranking_options": {
"ranker": "string",
"score_threshold": 0
},
"filters": null
}
],
"tool_choice": "string",
"truncation": "disabled",
"id": "string",
"object": "string",
"status": "string",
"created_at": 0,
"error": {
"code": "string",
"message": "string"
},
"incomplete_details": {
"reason": "string"
},
"output": [
{
"id": "string",
"type": "string",
"role": "string",
"content": [
{
"type": "output_text",
"text": "string",
"annotations": [
{
"type": "file_citation",
"file_id": "string",
"index": 0
}
]
}
],
"status": "string"
}
],
"output_text": "string",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true
}
创建音乐
POST
/suno/submit/music
分为3种模式
灵感模式:
只需要提交以下参数
gpt_description_prompt
make_instrumental
mv
Suno 会自动生成 歌词、标题、风格标签
自定义模式:
需要提交参数
prompt
title
tags
make_instrumental
mv
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"continue_at": 0,
"continue_clip_id": "string",
"gpt_description_prompt": "string",
"make_instrumental": true,
"mv": "string",
"prompt": "string",
"tags": "string",
"task_id": "string",
"title": "string"
}
Responses
application/json
{
"id": "string",
"title": "string",
"handle": "string",
"status": "string",
"user_id": "string",
"is_liked": true,
"metadata": {
"tags": "string",
"type": "string",
"prompt": "string",
"stream": true,
"history": null,
"duration": 0,
"error_type": null,
"error_message": null,
"concat_history": null,
"refund_credits": true,
"audio_prompt_id": null,
"gpt_description_prompt": null
},
"reaction": null,
"audio_url": "string",
"image_url": "string",
"is_public": true,
"video_url": "string",
"created_at": "string",
"is_trashed": true,
"model_name": "string",
"play_count": 0,
"display_name": "string",
"upvote_count": 0,
"image_large_url": "string",
"is_video_pending": true,
"is_handle_updated": true,
"major_model_version": "string"
}
创建歌词
批量获取任务
POST
/suno/submit/fetch
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"action": "string",
"ids": [
"string"
]
}
Responses
application/json
{
"code": "string",
"message": "string",
"data": [
{
"task_id": "string",
"action": "string",
"status": "string",
"fail_reason": "string",
"submit_time": 0,
"start_time": 0,
"finish_time": 0,
"progress": "string",
"data": [
{
"id": "string",
"title": "string",
"handle": "string",
"status": "string",
"is_liked": true,
"metadata": {
"tags": "string",
"type": "string",
"prompt": "string",
"stream": true,
"history": null,
"duration": 0,
"error_type": null,
"error_message": null,
"concat_history": null,
"refund_credits": true,
"audio_prompt_id": null,
"gpt_description_prompt": null
},
"reaction": null,
"audio_url": "string",
"image_url": "string",
"is_public": true,
"video_url": "string",
"created_at": "string",
"is_trashed": true,
"model_name": "string",
"play_count": 0,
"display_name": "string",
"upvote_count": 0,
"image_large_url": "string",
"is_video_pending": true,
"is_handle_updated": true,
"major_model_version": "string"
}
]
}
]
}
查询单个任务
GET
/suno/submit/fetch/{task_id}
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
task_id*
Typestring
RequiredResponses
application/json
{
"code": "string",
"message": "string",
"data": {
"task_id": "string",
"action": "string",
"status": "string",
"fail_reason": "string",
"submit_time": 0,
"start_time": 0,
"finish_time": 0,
"progress": "string",
"data": {
"id": "string",
"text": "string",
"title": "string",
"status": "string"
}
}
}
创建音乐
POST
/udio/submit/music
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"gen_params": {
"lyrics": "string",
"lyrics_type": "string",
"prompt": "string",
"bypass_prompt_optimization": true,
"seed": 0,
"song_section_start": 0,
"prompt_strength": 0,
"clarity_strength": 0,
"lyrics_strength": 0,
"generation_quality": 0,
"model_type": "string",
"config": {
"mode": "string"
}
}
}
Responses
application/json
{
"code": "string",
"message": "string",
"data": "string"
}
查询任务
GET
/udio/fetch/{task_id}
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
task_id*
任务ID
Typestring
RequiredResponses
application/json
{
"code": "string",
"message": "string",
"data": {
"task_id": "string",
"action": "string",
"status": "string",
"fail_reason": "string",
"submit_time": 0,
"start_time": 0,
"finish_time": 0,
"progress": "string",
"songs": [
{
"id": "string",
"tags": [
"string"
],
"liked": true,
"likes": 0,
"plays": 0,
"title": "string",
"artist": "string",
"lyrics": "string",
"prompt": "string",
"user_id": "string",
"disliked": true,
"duration": 0,
"error_id": null,
"finished": true,
"song_path": "string",
"user_tags": [
"string"
],
"created_at": "string",
"error_code": null,
"error_type": null,
"image_path": "string",
"video_path": null,
"attribution": "string",
"description": "string",
"publishable": true,
"artist_image": "string",
"error_detail": null,
"published_at": null,
"generation_id": "string",
"replaced_tags": {
"melodic, jazz, chill-out, smooth, atmospheric, 抒情, 夜晚": {
"tags": [
"string"
],
"type": "string"
},
"nu jazz, downtempo, chillout, electronic, lounge, vocal jazz, sensual, rhythmic, mellow, female vocalist, nocturnal, warm, peaceful, urban": {
"tags": [
"string"
],
"type": "string"
},
"romantic, night, soft, melodic, jazz, smooth jazz, town, lyrical": {
"tags": [
"string"
],
"type": "string"
},
"cool jazz, jazz, instrumental, acoustic, mellow, warm, soothing, nocturnal, improvisation, romantic, ballad, sentimental, love, sensual, melodic, calm": {
"tags": [
"string"
],
"type": "string"
}
},
"original_song_path": null,
"audio_conditioning_type": null
}
]
}
}
提交swap_face任务
POST
/mj/insight-face/swap
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"sourceBase64": "string",
"targetBase64": "string",
"accountFilter": {
"instanceId": "string"
},
"notifyHook": "string",
"state": "string"
}
Responses
application/json
{
"code": 0,
"description": "string",
"result": "string"
}
绘图变化(UPSCALE; VARIATION; REROLL)
POST
/mj/submit/change
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"action": "string",
"index": 0,
"notifyHook": "string",
"state": "string",
"taskId": "string"
}
Responses
application/json
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}
执行动作(所有的关联按钮动作UPSCALE; VARIATION; REROLL; ZOOM等)
绘图变化-simple(UPSCALE; VARIATION; REROLL)
提交Blend任务(图生图)
提交Describe任务(图生文)
提交Imagine任务(文生图、文图生图)
提交Modal(提交局部重绘、ZOOM)
提交Shorten任务(prompt分析)
Generates(文生图)
POST
/ideogram/generate
Authorizations
apikey-header-Api-Key
TypeAPI Key (header: Api-Key)
Request Body
application/json
{
}
Responses
application/json
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}
Remix(混合图)
POST
/ideogram/remix
Authorizations
apikey-header-Api-Key
TypeAPI Key (header: Api-Key)
Request Body
multipart/form-data
object
image_file
string
图片文件
Format
"binary"image_request
string
{
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"aspect_ratio": "ASPECT_10_16",
"image_weight": 50,
"magic_prompt_option": "ON",
"model": "V_2"
}
Responses
application/json
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}
Upscale(放大高清)
POST
/ideogram/upscale
Authorizations
apikey-header-Api-Key
TypeAPI Key (header: Api-Key)
Request Body
multipart/form-data
object
image_file
string
图片文件
Format
"binary"image_request
string
{"resemblance":50,"magic_prompt_option":"AUTO","prompt":"A%20serene%20tropical%20beach%20","seed":12345,"detail":50}
Responses
application/json
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}
Describe(描述)
POST
/ideogram/describe
Authorizations
apikey-header-Api-Key
TypeAPI Key (header: Api-Key)
Request Body
multipart/form-data
object
image_file
string
图片文件
Format
"binary"Responses
application/json
{
"descriptions": [
{
"text": "string"
}
],
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}
生成视频
POST
/luma/generations
Authorizations
bearer
TypeHTTP (bearer)
Request Body
application/json
{
"user_prompt": "string",
"expand_prompt": true,
"loop": true,
"image_url": "string",
"image_end_url": "string"
}
Responses
application/json
{
"id": "string",
"prompt": "string",
"state": "string",
"created_at": "string",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}
扩展视频
POST
/luma/generations/{task_id}/extend
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
task_id*
Typestring
RequiredRequest Body
application/json
{
"user_prompt": "string",
"expand_prompt": true,
"loop": true,
"image_url": "string",
"image_end_url": "string"
}
Responses
application/json
{
"id": "string",
"prompt": "string",
"state": "string",
"created_at": "string",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}
获取下载地址
获取任务
GET
/luma/generations/{task_id}
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
task_id*
任务ID
Typestring
RequiredResponses
application/json
{
"id": "string",
"liked": null,
"state": "string",
"video": {
"url": "string",
"width": 0,
"height": 0,
"thumbnail": "string",
"download_url": "string"
},
"prompt": "string",
"user_id": "string",
"batch_id": "string",
"thumbnail": {
"url": "string",
"width": 0,
"height": 0
},
"video_raw": {
"url": "string",
"width": 0,
"height": 0
},
"created_at": "string",
"last_frame": {
"url": "string",
"width": 0,
"height": 0
},
"pipeline_id": "string",
"queue_state": null,
"estimate_wait_seconds": null,
"url": "string"
}
创建视频
POST
/custom_video/model/{model}
目前仅支持 veo-2
状态:
SUBMITTED 已提交
QUEUED 队列中
IN_PROGRESS 生成中
SUCCESS 成功
FAILURE 失败
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
model*
Typestring
RequiredRequest Body
application/json
{
}
Responses
application/json
{
"id": "string",
"model": "string",
"status": "string"
}
获取视频
GET
/custom_video/fetch/{id}
目前仅支持 veo-2
状态:
SUBMITTED 已提交
QUEUED 队列中
IN_PROGRESS 生成中
SUCCESS 成功
FAILURE 失败
Authorizations
bearer
TypeHTTP (bearer)
Parameters
Path Parameters
id*
Typestring
RequiredResponses
application/json
{
"id": "string",
"model": "string",
"status": "string",
"error": "string",
"output": "string"
}