Skip to content

Servers

https://api.uniai.io请求地址

文本生成音频

POST
/v1/audio/speech

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"model": "string",
"input": "string",
"instructions": "string",
"voice": "ash",
"response_format": "mp3",
"speed": 1
}

Responses

OK

application/octet-stream

Playground

Authorization
Body

Samples


音频转文本

POST
/v1/audio/transcriptions

Authorizations

bearer
TypeHTTP (bearer)

Request Body

multipart/form-data
object

要转录的音频文件对象(非文件名),格式为以下之一:flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav或webm。

Format"binary"

使用模型的ID。选项有 gpt-4o-transcribegpt-4o-mini-transcribewhisper-1

输入音频的语言。以ISO-639-1(例如en)格式提供输入语言将提高准确性和延迟。

可选文本,用于指导模型的风格或继续之前的音频片段。

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"

采样温度,介于0和1之间。更高的值,如0.8,会使输出更随机,而更低的值,如0.2,会使输出更集中和确定。如果设置为0,模型将使用对数概率自动增加温度,直到达到某些阈值。

Default0
string[]

附加信息,包括在转录响应中。

logprobs 将返回响应中标记的对数概率,以了解模型对转录的置信度。

logprobs 仅在将 response_format 设置为 json 时有效,并且仅与 gpt-4o-transcribegpt-4o-mini-transcribe 模型一起使用。

string[]

此转录要填充的时间戳粒度。必须将response_format设置为verbose_json才能使用时间戳粒度。支持以下一个或两个选项:wordsegment。注意:分段时间戳不会增加额外延迟,但生成单词时间戳会增加额外延迟。

Default"segment"

如果设置为true,模型响应数据将随着生成实时传输到客户端,使用的是服务器端事件

请参阅语音转文字指南中的流式传输部分获取更多信息。

注意:whisper-1模型不支持流式传输,将被忽略。

Defaultfalse

Responses

OK

application/json
JSON
{
"text": "string",
"logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}

Playground

Authorization
Body

Samples


创建转录

POST
/v1/audio/translations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

multipart/form-data
object

音频文件对象(不是文件名)翻译,格式为以下之一:flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav 或 webm。

Format"binary"

要使用的模型ID。目前仅提供whisper-1

一个可选的文本,用于指导模型的风格或继续之前的音频片段

输出格式,选项之一:jsontextsrtverbose_jsonvtt

Valid values"json""text""srt""verbose_json""vtt"
Default"json"

采样温度,介于0和1之间。较高的值如0.8会使输出更随机,而较低的值如0.2会使其更集中和确定。如果设置为0,模型将使用对数概率自动增加温度,直到达到某些阈值。

Default0

Responses

OK

application/json
JSON
{
"text": "string"
}

Playground

Authorization
Body

Samples


Chat


聊天接口

POST
/v1/chat/completions

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
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
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
}
}
}

Playground

Authorization
Body

Samples


Completions


自动补全

POST
/v1/completions

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
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
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
}
}
}

Playground

Authorization
Body

Samples


Embeddings


向量接口

POST
/v1/embeddings

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"input": "This is a test.",
"model": "text-embedding-3-small",
"encoding_format": "float",
"dimensions": 0,
"user": "user-1234"
}

Responses

OK

application/json
JSON
{
"data": [
{
"index": 0,
"embedding": [
0
],
"object": "string"
}
],
"model": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}

Playground

Authorization
Body

Samples


Images


图像编辑

POST
/v1/images/edits

Authorizations

bearer
TypeHTTP (bearer)

Request Body

multipart/form-data
object
string |array
Required

要编辑的图像。必须是支持的图像文件或图像数组。

对于 gpt-image-1,每个图像应为小于25MB的 pngwebpjpg 文件。您最多可以提供16张图像。

对于 dall-e-2,您只能提供一张图像,且应为小于4MB的正方形 png 文件。

所需图像的文字描述。dall-e-2的最大长度为1000个字符,gpt-image-1的最大长度为32000个字符。

一个额外的图像,其完全透明的区域(例如,alpha为零的地方)表示应编辑image的位置。如果提供了多个图像,掩码将应用于第一个图像。必须是有效的PNG文件,大小小于4MB,并且与image具有相同的尺寸。

Format"binary"

用于图像生成的模型。仅支持 dall-e-2gpt-image-1。默认使用 dall-e-2,除非使用了特定于 gpt-image-1 的参数。

Default"dall-e-2"

要生成的图像数量。必须在1到10之间。

Minimum1
Maximum10
Default1

生成图像的尺寸。对于 gpt-image-1,必须是 1024x10241536x1024(横向)、1024x1536(纵向)之一,或 auto(默认值);对于 dall-e-2,必须是 256x256512x5121024x1024 之一。

Valid values"256x256""512x512""1024x1024""1536x1024""1024x1536""auto"
Default"1024x1024"

生成的图像返回的格式。必须是 urlb64_json 之一。URL 在图像生成后仅有效 60 分钟。此参数仅支持 dall-e-2,因为 gpt-image-1 始终返回 base64 编码的图像。

Valid values"url""b64_json"
Default"url"

表示您的终端用户的唯一标识符,有助于 OpenAI 监控和检测滥用行为。

将生成的图像质量。highmediumlow 仅支持 gpt-image-1dall-e-2 仅支持 standard 质量。默认值为 auto

Valid values"standard""low""medium""high""auto"
Default"auto"

Responses

OK

application/json
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
}
}
}

Playground

Authorization
Body

Samples


图像生成

POST
/v1/images/generations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
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
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
}
}
}

Playground

Authorization
Body

Samples


图像变体

POST
/v1/images/variations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

multipart/form-data
object

用于变体的基础图像。必须是有效的PNG文件,大小小于4MB,且为正方形。

Format"binary"

用于图像生成的模型。目前仅支持 dall-e-2

Default"dall-e-2"

要生成的图像数量。必须在1到10之间。

Minimum1
Maximum10
Default1

返回生成的图像的格式。必须是 urlb64_json 之一。URL 仅在图像生成后 60 分钟内有效。

Valid values"url""b64_json"
Default"url"

生成的图像大小。必须是以下之一:256x256512x5121024x1024

Valid values"256x256""512x512""1024x1024"
Default"1024x1024"

Responses

OK

application/json
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
}
}
}

Playground

Authorization
Body

Samples


Models


获取模型列表

GET
/v1/models

Authorizations

bearer
TypeHTTP (bearer)

Responses

OK

application/json
JSON
{
"object": "string",
"data": [
{
"id": "string",
"created": 0,
"object": "string",
"owned_by": "string"
}
]
}

Playground

Authorization

Samples


Moderations


审核

POST
/v1/moderations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"input": "I want to kill them.",
"model": "omni-moderation-2024-09-26"
}

Responses

OK

application/json
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"
]
}
}
]
}

Playground

Authorization
Body

Samples


Responses


response

POST
/v1/responses

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
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
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
}

Playground

Authorization
Body

Samples


平台API


余额

GET
/v1/billing/usage

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Query Parameters

type

token 表示查询当前令牌,不传入则查询用户

Typestring
Example"token"
unit

usd 表示返回值为美元,不传入则为积分值

Typestring
Example"usd"

Responses

application/json
JSON
{
"data": {
"balance": 0,
"used": 0,
"cache_used": 0
},
"success": true
}

Playground

Authorization
Variables
Key
Value

Samples


Suno


创建音乐

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
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
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"
}

Playground

Authorization
Body

Samples


创建歌词

POST
/suno/submit/lyrics

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"prompt": "string"
}

Responses

application/json
JSON
{
"id": "string",
"text": "string",
"title": "string",
"status": "string"
}

Playground

Authorization
Body

Samples


批量获取任务

POST
/suno/submit/fetch

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"action": "string",
"ids": [
"string"
]
}

Responses

application/json
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"
}
]
}
]
}

Playground

Authorization
Body

Samples


查询单个任务

GET
/suno/submit/fetch/{task_id}

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

task_id*
Typestring
Required

Responses

application/json
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"
}
}
}

Playground

Authorization
Variables
Key
Value

Samples


Udio


创建音乐

POST
/udio/submit/music

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
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
JSON
{
"code": "string",
"message": "string",
"data": "string"
}

Playground

Authorization
Body

Samples


查询任务

GET
/udio/fetch/{task_id}

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

task_id*

任务ID

Typestring
Required

Responses

application/json
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
}
]
}
}

Playground

Authorization
Variables
Key
Value

Samples


MidJourney


提交swap_face任务

POST
/mj/insight-face/swap

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"sourceBase64": "string",
"targetBase64": "string",
"accountFilter": {
"instanceId": "string"
},
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"result": "string"
}

Playground

Authorization
Body

Samples


绘图变化(UPSCALE; VARIATION; REROLL)

POST
/mj/submit/change

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"action": "string",
"index": 0,
"notifyHook": "string",
"state": "string",
"taskId": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


执行动作(所有的关联按钮动作UPSCALE; VARIATION; REROLL; ZOOM等)

POST
/mj/submit/action

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"customId": "string",
"taskId": "string",
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


绘图变化-simple(UPSCALE; VARIATION; REROLL)

POST
/mj/submit/simple-change

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"content": "string",
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


提交Blend任务(图生图)

POST
/mj/submit/blend

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"base64Array": [
"string"
],
"dimensions": "string",
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


提交Describe任务(图生文)

POST
/mj/submit/describe

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"base64": "string",
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


提交Imagine任务(文生图、文图生图)

POST
/mj/submit/imagine

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"base64Array": [
"string"
],
"notifyHook": "string",
"prompt": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


提交Modal(提交局部重绘、ZOOM)

POST
/mj/submit/modal

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"maskBase64": "string",
"prompt": "string",
"taskId": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


提交Shorten任务(prompt分析)

POST
/mj/submit/shorten

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"botType": "string",
"prompt": "string",
"notifyHook": "string",
"state": "string"
}

Responses

application/json
JSON
{
"code": 0,
"description": "string",
"properties": {
},
"result": 0
}

Playground

Authorization
Body

Samples


ideogram


Generates(文生图)

POST
/ideogram/generate

Authorizations

apikey-header-Api-Key
TypeAPI Key (header: Api-Key)

Request Body

application/json
JSON
{
}

Responses

application/json
JSON
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}

Playground

Authorization
Body

Samples


Remix(混合图)

POST
/ideogram/remix

Authorizations

apikey-header-Api-Key
TypeAPI Key (header: Api-Key)

Request Body

multipart/form-data
object

图片文件

Format"binary"

{
"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
JSON
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}

Playground

Authorization
Body

Samples


Upscale(放大高清)

POST
/ideogram/upscale

Authorizations

apikey-header-Api-Key
TypeAPI Key (header: Api-Key)

Request Body

multipart/form-data
object

图片文件

Format"binary"

{"resemblance":50,"magic_prompt_option":"AUTO","prompt":"A%20serene%20tropical%20beach%20","seed":12345,"detail":50}

Responses

application/json
JSON
{
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}

Playground

Authorization
Body

Samples


Describe(描述)

POST
/ideogram/describe

Authorizations

apikey-header-Api-Key
TypeAPI Key (header: Api-Key)

Request Body

multipart/form-data
object

图片文件

Format"binary"

Responses

application/json
JSON
{
"descriptions": [
{
"text": "string"
}
],
"created": "string",
"data": [
{
"prompt": "string",
"resolution": "string",
"is_image_safe": true,
"seed": 0,
"url": "string",
"style_type": "string"
}
]
}

Playground

Authorization
Body

Samples


Luma


生成视频

POST
/luma/generations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"user_prompt": "string",
"expand_prompt": true,
"loop": true,
"image_url": "string",
"image_end_url": "string"
}

Responses

application/json
JSON
{
"id": "string",
"prompt": "string",
"state": "string",
"created_at": "string",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}

Playground

Authorization
Body

Samples


扩展视频

POST
/luma/generations/{task_id}/extend

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

task_id*
Typestring
Required

Request Body

application/json
JSON
{
"user_prompt": "string",
"expand_prompt": true,
"loop": true,
"image_url": "string",
"image_end_url": "string"
}

Responses

application/json
JSON
{
"id": "string",
"prompt": "string",
"state": "string",
"created_at": "string",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}

Playground

Authorization
Variables
Key
Value
Body

Samples


获取下载地址

GET
/luma/generations/{task_id}/download_video_url

获取下载地址, 如果已经包含请不要请求该地址

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

task_id*

任务ID

Typestring
Required

Responses

application/json
JSON
{
"url": "string"
}

Playground

Authorization
Variables
Key
Value

Samples


获取任务

GET
/luma/generations/{task_id}

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

task_id*

任务ID

Typestring
Required

Responses

application/json
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"
}

Playground

Authorization
Variables
Key
Value

Samples


Video


创建视频

POST
/custom_video/model/{model}

目前仅支持 veo-2

状态:
SUBMITTED 已提交
QUEUED 队列中
IN_PROGRESS 生成中
SUCCESS 成功
FAILURE 失败

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

model*
Typestring
Required

Request Body

application/json
JSON
{
}

Responses

application/json
JSON
{
"id": "string",
"model": "string",
"status": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples


获取视频

GET
/custom_video/fetch/{id}

目前仅支持 veo-2

状态:
SUBMITTED 已提交
QUEUED 队列中
IN_PROGRESS 生成中
SUCCESS 成功
FAILURE 失败

Authorizations

bearer
TypeHTTP (bearer)

Parameters

Path Parameters

id*
Typestring
Required

Responses

application/json
JSON
{
"id": "string",
"model": "string",
"status": "string",
"error": "string",
"output": "string"
}

Playground

Authorization
Variables
Key
Value

Samples


Powered by VitePress OpenAPI