openapi: 3.0.0 info: title: SiliconFlow API description: The SiliconFlow REST API version: "1.0.0" contact: name: SiliconFlow Support url: https://www.siliconflow.cn/ license: name: MIT url: https://github.com/siliconflow/siliconcloud/blob/main/LICENSE servers: - url: https://api.siliconflow.cn/v1 security: - bearerAuth: [ ] paths: /user/info: get: summary: 获取用户信息 operationId: user-info description: 获取用户信息,包括余额和状态 tags: - UserInfo responses: '200': description: Successful response content: application/json: schema: type: object properties: code: type: integer example: 20000 message: type: string example: OK status: type: boolean example: true data: type: object properties: id: type: string example: "userid" name: type: string example: "username" image: type: string example: "user_avatar_image_url" email: type: string example: "user_email_address" isAdmin: type: boolean example: false balance: type: string example: "0.88" status: type: string example: "normal" introduction: type: string example: "user_introduction" role: type: string example: "user_role" chargeBalance: type: string example: "88.00" totalBalance: type: string example: "88.88" '400': description: 'BadRequest' content: application/json: schema: $ref: "#/components/schemas/StringData" '401': description: 'Unauthorized' content: application/json: schema: $ref: "#/components/schemas/StringData" '404': description: 'NotFound' content: application/json: schema: $ref: "#/components/schemas/StringData" '429': description: 'RateLimit' content: application/json: schema: $ref: "#/components/schemas/StringData" '503': description: 'Overloaded' content: application/json: schema: $ref: "#/components/schemas/StringData" '504': description: 'Timeout' content: application/json: schema: $ref: "#/components/schemas/StringData" deprecated: false /models: get: summary: Get Model List operationId: Retrieve a list of models. description: Retrieve models information. parameters: - name: type in: query description: The type of models required: false schema: type: string enum: [ text, image, audio, video ] - name: sub_type in: query description: The sub type of models. You can use it to filter models individually without setting type. required: false schema: type: string enum: [ chat, embedding, reranker, text-to-image, image-to-image, speech-to-text, text-to-video ] tags: - Models responses: '200': description: Successful response content: application/json: schema: type: object properties: object: type: string example: list data: type: array items: type: object properties: id: type: string example: stabilityai/stable-diffusion-xl-base-1.0 object: type: string example: model created: type: integer example: 0 owned_by: type: string example: "" '400': description: 'BadRequest' content: application/json: schema: $ref: "#/components/schemas/StringData" '401': description: 'Unauthorized' content: application/json: schema: $ref: "#/components/schemas/StringData" '404': description: 'NotFound' content: application/json: schema: $ref: "#/components/schemas/StringData" '429': description: 'RateLimit' content: application/json: schema: $ref: "#/components/schemas/StringData" '503': description: 'Overloaded' content: application/json: schema: $ref: "#/components/schemas/StringData" '504': description: 'Timeout' content: application/json: schema: $ref: "#/components/schemas/StringData" deprecated: false /uploads/audio/voice: post: summary: Upload Voice description: 上传用户预置音色,支持以 base64 编码或者文件形式上传,参考https://docs.siliconflow.cn/capabilities/text-to-speech#2-2) operationId: uploadAudioVoice parameters: [] requestBody: content: multipart/form-data: schema: type: object properties: model: type: string example: "fishaudio/fish-speech-1.4" enum: ["fishaudio/fish-speech-1.4"] description: "预置音色的模型名称" customName: type: string example: "your-voice-name" description: "用户自定义的音色名称" default: "硅基流动音色模型" text: type: string example: "在一无所知中, 梦里的一天结束了,一个新的轮回便会开始" description: "音频对应的文字内容" default: "在一无所知中, 梦里的一天结束了,一个新的轮回便会开始" required: - model - customName - text oneOf: - properties: audio: title: base64 编码音频 type: string example: "data:audio/mpeg;base64,aGVsbG93b3JsZA==" description: "使用 base64 编码的音频文件,头部为:`data:audio/mpeg;base64,`格式" - properties: file: title: 文件上传音频 type: string format: binary example: /path/to/audio.mp3 description: "待上传的文件" responses: '200': description: Successful response content: application/json: schema: type: object properties: uri: type: string example: 'speech:your-voice-name:cm04pf7az00061413w7kz5qxs:mjtkgbyuunvtybnsvbxd' '400': description: 'BadRequest' content: application/json: schema: $ref: "#/components/schemas/StringData" '401': description: 'Unauthorized' content: application/json: schema: $ref: "#/components/schemas/StringData" '404': description: 'NotFound' content: application/json: schema: $ref: "#/components/schemas/StringData" '429': description: 'RateLimit' content: application/json: schema: $ref: "#/components/schemas/StringData" '503': description: 'Overloaded' content: application/json: schema: $ref: "#/components/schemas/StringData" '504': description: 'Timeout' content: application/json: schema: $ref: "#/components/schemas/StringData" deprecated: false /chat/completions: post: summary: Chat Completions operationId: chat-completions description: Creates a model response for the given chat conversation. tags: - Chat Completions requestBody: content: application/json: schema: $ref: "#/components/schemas/ChatCompletionRequest" responses: '200': description: '200' content: application/json: schema: $ref: "#/components/schemas/ChatCompletionResponse" text/event-stream: schema: $ref: "#/components/schemas/ChatCompletionStream" '400': description: 'BadRequest' content: application/json: schema: $ref: "#/components/schemas/StringData" '401': description: 'Unauthorized' content: application/json: schema: $ref: "#/components/schemas/StringData" '404': description: 'NotFound' content: application/json: schema: $ref: "#/components/schemas/StringData" '429': description: 'RateLimit' content: application/json: schema: $ref: "#/components/schemas/StringData" '503': description: 'Overloaded' content: application/json: schema: $ref: "#/components/schemas/StringData" '504': description: 'Timeout' content: application/json: schema: $ref: "#/components/schemas/StringData" deprecated: false /embeddings: post: summary: Create Embeddings description: Creates an embedding vector representing the input text. operationId: createEmbedding tags: - Embeddings requestBody: content: application/json: schema: $ref: '#/components/schemas/EmbeddingsRequest' responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/EmbeddingsResponse' '400': description: 'BadRequest' content: application/json: schema: $ref: '#/components/schemas/StringData' '401': description: 'Unauthorized' content: application/json: schema: $ref: '#/components/schemas/StringData' '404': description: 'NotFound' content: application/json: schema: $ref: '#/components/schemas/StringData' '429': description: 'RateLimit' content: application/json: schema: $ref: '#/components/schemas/StringData' '503': description: 'Overloaded' content: application/json: schema: $ref: '#/components/schemas/StringData' '504': description: 'Timeout' content: application/json: schema: $ref: '#/components/schemas/StringData' deprecated: false /audio/speech: post: operationId: createSpeech tags: - Audio summary: Create Speech description: 从输入文本生成音频。根据输入的文本生成音频。接口生成的数据为音频的二进制数据,需要使用者自行处理。参考:https://docs.siliconflow.cn/capabilities/text-to-speech#5 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateSpeechRequest" responses: "200": description: 根据输入的文本生成音频。接口生成的数据为音频的二进制数据,需要使用者自行处理。参考:https://docs.siliconflow.cn/capabilities/text-to-speech#5 headers: Transfer-Encoding: schema: type: string description: chunked content: application/octet-stream: schema: type: string format: binary /audio/transcriptions: post: summary: Create Audio Transcriptions description: Creates an audio transcription. operationId: createAudioTranscriptions tags: - Audio requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/AudioRequest' responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/AudioResponse' '400': description: 'BadRequest' content: application/json: schema: $ref: '#/components/schemas/StringData' '401': description: 'Unauthorized' content: application/json: schema: $ref: '#/components/schemas/StringData' '404': description: 'NotFound' content: application/json: schema: $ref: '#/components/schemas/StringData' '429': description: 'RateLimit' content: application/json: schema: $ref: '#/components/schemas/StringData' '503': description: 'Overloaded' content: application/json: schema: $ref: '#/components/schemas/StringData' '504': description: 'Timeout' content: application/json: schema: $ref: '#/components/schemas/StringData' deprecated: false /rerank: post: summary: Create Rerank description: Creates a rerank request. operationId: createRerank tags: - Rerank requestBody: content: application/json: schema: $ref: '#/components/schemas/RerankRequest' responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/RerankResponse' '400': description: 'BadRequest' content: application/json: schema: $ref: '#/components/schemas/StringData' '401': description: 'Unauthorized' content: application/json: schema: $ref: '#/components/schemas/StringData' '404': description: 'NotFound' content: application/json: schema: $ref: '#/components/schemas/StringData' '429': description: 'RateLimit' content: application/json: schema: $ref: '#/components/schemas/StringData' '503': description: 'Overloaded' content: application/json: schema: $ref: '#/components/schemas/StringData' '504': description: 'Timeout' content: application/json: schema: $ref: '#/components/schemas/StringData' deprecated: false /images/generations: post: summary: Image Generation operationId: ImageGeneration description: Creates an image response for the given prompt. tags: - Image requestBody: content: application/json: schema: oneOf: - $ref: "#/components/schemas/stable-diffusion-3-5-large" - $ref: "#/components/schemas/FLUX.1-schnell" - $ref: "#/components/schemas/Pro-FLUX.1-schnell" - $ref: "#/components/schemas/FLUX.1-dev" - $ref: "#/components/schemas/stable-diffusion-3-medium" - $ref: "#/components/schemas/stable-diffusion-xl-base-1.0" - $ref: "#/components/schemas/stable-diffusion-2-1" responses: '200': description: '200' content: application/json: schema: $ref: "#/components/schemas/ImagesGenerationResponse" '400': description: 'BadRequest' content: application/json: schema: $ref: "#/components/schemas/StringData" '401': description: 'Unauthorized' content: application/json: schema: $ref: "#/components/schemas/StringData" '404': description: 'NotFound' content: application/json: schema: $ref: "#/components/schemas/StringData" '429': description: 'RateLimit' content: application/json: schema: $ref: "#/components/schemas/StringData" '503': description: 'Overloaded' content: application/json: schema: $ref: "#/components/schemas/StringData" '504': description: 'Timeout' content: application/json: schema: $ref: "#/components/schemas/StringData" deprecated: false components: securitySchemes: bearerAuth: type: http scheme: bearer schemas: EmbeddingsRequest: type: object required: - model - input properties: model: type: string description: The name of the embedding model to use.要使用的 embedding 模型名称。 example: BAAI/bge-large-zh-v1.5 enum: - BAAI/bge-large-zh-v1.5 - BAAI/bge-large-en-v1.5 - netease-youdao/bce-embedding-base_v1 - BAAI/bge-m3 - Pro/BAAI/bge-m3 input: description: | Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (512 tokens for all models except BAAI/bge-m3 which is 8192), cannot be an empty string. 输入的文本将被编码为字符串或 tokens 数组。要在单个请求中嵌入多个输入,请传递字符串数组或字符串数组。每个字符串不得超过模型的最大 tokens 限制(BAAI/bge-m3模型为8192tokens,其余模型为512tokens),且不能为空字符串。 default: "硅基流动embedding上线,多快好省的 embedding 服务,快来试试吧" oneOf: - type: string title: string description: The string that will be turned into an embedding. the item must not exceed the max models tokens limitation. 将字符串数组转换为嵌入,string 长度不得超过模型的最大 tokens 限制。当前输入长度不得超过当前模型的 512 个 tokens。 default: "硅基流动embedding上线,多快好省的 embedding 服务,快来试试吧" example: "硅基流动embedding上线,多快好省的 embedding 服务,快来试试吧" - type: array title: array description: | The array of strings that will be turned into an embedding. The array length must not exceed the max size, and the item must not exceed the max models tokens limitation. Current, the maximum array size is 32 , At the same time every item must not exceed 512 tokens for current models. 将字符串数组转换为嵌入。数组长度不得超过最大限制,且每项不得超过模型的最大 tokens 限制。目前,最大数组大小为 32,同时每项不得超过当前模型的 512 个 tokens。 minItems: 1 maxItems: 32 items: type: string default: "['大语言模型', 'LLM', 'Embedding', 'RAG']" example: "['大语言模型', 'LLM', 'Embedding', 'RAG']" encoding_format: description: | "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). 返回嵌入的格式。可以是 float 或 [`base64`](https://pypi.org/project/pybase64/)." example: "float" default: "float" type: string enum: [ "float", "base64" ] EmbeddingsResponse: type: object required: - object - model - data - usage properties: object: type: string description: The object type, which is always "list". enum: - [ list ] model: description: The name of the model used to generate the embedding. type: string data: type: array description: The list of embeddings generated by the model. items: type: object required: [ index, object, embedding ] properties: object: type: string enum: - embedding embedding: type: array items: type: number index: type: integer usage: type: object description: The usage information for the request. properties: prompt_tokens: type: integer description: The number of tokens used by the prompt. completion_tokens: type: integer description: The number of tokens used by the completion. total_tokens: type: integer description: The total number of tokens used by the request. required: - prompt_tokens - total_tokens - completion_tokens RerankRequest: type: object required: - model - query - documents properties: model: type: string description: Specifies the model to be used. example: BAAI/bge-reranker-v2-m3 enum: - BAAI/bge-reranker-v2-m3 - netease-youdao/bce-reranker-base_v1 query: type: string description: Required. The search query. example: Apple default: Apple documents: type: array minItems: 1 items: type: string description: Required. List of documents to be reordered. If document objects are provided, the 'text' field is mandatory, and other fields will be preserved in the response. example: [ "苹果", "香蕉", "水果", "蔬菜" ] default: [ "苹果", "香蕉", "水果", "蔬菜" ] top_n: type: integer example: 4 description: Number of most relevant documents or indices to return. return_documents: type: boolean default: false description: If false, the response does not include document text; if true, it includes the input document text. max_chunks_per_doc: type: integer default: 1024 description: Maximum number of chunks generated from within a document. Long documents are divided into multiple chunks for calculation, and the highest score among the chunks is taken as the document's score. overlap_tokens: type: integer default: 80 maximum: 80 description: Number of token overlaps between adjacent chunks when documents are chunked. RerankResponse: type: object required: - id - results - tokens properties: id: type: string results: type: array items: type: object properties: document: type: object properties: text: type: string description: Original document content. index: type: integer description: The index value of the position in the input candidate doc array. relevance_score: type: number description: Similarity score. tokens: type: object properties: input_tokens: type: integer output_tokens: type: integer CreateSpeechRequest: type: object additionalProperties: false properties: model: description: | Current available TTS models: `fishaudio/fish-speech-1.4` type: string example: "fishaudio/fish-speech-1.4" enum: ["fishaudio/fish-speech-1.4"] input: type: string description: The text to generate audio for. maxLength: 128000 minLength: 1 voice: description: The voice to use when generating the audio. Supported voices are `fishaudio/fish-speech-1.4:alex`, `fishaudio/fish-speech-1.4:anna`, `fishaudio/fish-speech-1.4:bella`, `fishaudio/fish-speech-1.4:benjamin`, `fishaudio/fish-speech-1.4:charles`, `fishaudio/fish-speech-1.4:claire`, `fishaudio/fish-speech-1.4:david`, `fishaudio/fish-speech-1.4:diana`. Previews of the voices are available in the [Text to speech guide](/capabilities/text-to-speech). type: string enum: [ "fishaudio/fish-speech-1.4:alex", "fishaudio/fish-speech-1.4:anna", "fishaudio/fish-speech-1.4:bella", "fishaudio/fish-speech-1.4:benjamin", "fishaudio/fish-speech-1.4:charles", "fishaudio/fish-speech-1.4:claire", "fishaudio/fish-speech-1.4:david", "fishaudio/fish-speech-1.4:diana" ] response_format: description: "The format to audio in. Supported formats are `mp3`, `opus`, `wav`, `pcm`" default: "mp3" type: string enum: ["mp3", "opus", "wav", "pcm"] required: - model - input - voice AudioRequest: type: object required: - model - file properties: file: type: string description: The audio file object (not file name) to transcribe example: /path/to/audio.mp3 format: binary model: type: string description: The name of the audio model to use. example: FunAudioLLM/SenseVoiceSmall enum: - FunAudioLLM/SenseVoiceSmall AudioResponse: type: object description: Represents a transcription response returned by model, based on the provided input. required: - text properties: text: description: The transcribed text. type: string StringData: type: string ErrorData: type: object required: - error properties: error: type: object properties: message: type: string nullable: false type: type: string nullable: false param: type: string nullable: true default: null code: type: string nullable: true default: null required: - type - message - param - code FinishReason: type: string enum: - stop - eos - length - tool_calls LogprobsPart: type: object properties: tokens: type: array items: type: string description: List of token strings token_logprobs: type: array items: type: number format: float description: List of token log probabilities PromptPart: type: array items: type: object properties: text: type: string example: [INST] What is the capital of France? [/INST] default: [INST] What is the capital of France? [/INST] logprobs: $ref: "#/components/schemas/LogprobsPart" UsageData: type: object properties: prompt_tokens: type: integer completion_tokens: type: integer total_tokens: type: integer CompletionChoicesData: type: array items: type: object properties: text: type: string finish_reason: $ref: "#/components/schemas/FinishReason" logprobs: allOf: - $ref: "#/components/schemas/LogprobsPart" - nullable: true CompletionResponse: type: object properties: id: type: string choices: $ref: "#/components/schemas/CompletionChoicesData" prompt: $ref: "#/components/schemas/PromptPart" usage: $ref: "#/components/schemas/UsageData" created: type: integer model: type: string object: type: string enum: - text_completion required: - id - choices - usage - created - model - object CompletionStream: oneOf: - $ref: "#/components/schemas/CompletionEvent" CompletionEvent: type: object required: [ data ] properties: data: $ref: "#/components/schemas/CompletionChunk" CompletionChunk: type: object required: [ id, token, choices, usage, finish_reason ] properties: id: type: string token: $ref: "#/components/schemas/CompletionToken" choices: title: CompletionChoices type: array items: $ref: "#/components/schemas/CompletionChoice" usage: allOf: - $ref: "#/components/schemas/UsageData" - nullable: true finish_reason: allOf: - $ref: "#/components/schemas/FinishReason" - nullable: true CompletionChoice: type: object required: [ index ] properties: text: type: string CompletionToken: type: object required: [ id, text, logprob, special ] properties: id: type: integer text: type: string logprob: type: number format: float special: type: boolean ChatCompletionChoicesData: type: array items: type: object properties: message: type: object properties: role: type: string example: assistant content: type: string finish_reason: $ref: "#/components/schemas/FinishReason" ChatCompletionRequestMessageContentPartText: type: object title: Text content part properties: type: type: string enum: [ "text" ] description: The type of the content part. default: "text" text: type: string description: The text content. default: "描述这张图片" required: - type - text ChatCompletionRequestMessageContentPartImage: type: object title: Image content part properties: type: type: string enum: [ "image_url" ] description: The type of the content part. default: "image_url" image_url: type: object properties: url: type: string description: Either a URL of the image or the base64 encoded image data. default: "https://sf-maas-uat-prod.oss-cn-shanghai.aliyuncs.com/dog.png" detail: type: string description: Specifies the detail level of the image. enum: [ "auto", "low", "high" ] default: "auto" required: - url required: - type - image_url ChatCompletionRequestUserMessageContentPart: oneOf: - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartText" - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartImage" x-oaiExpandable: true ChatCompletionRequest: type: object required: - model - messages properties: model: type: string description: The name of the model to query. example: deepseek-ai/DeepSeek-V2.5 default: deepseek-ai/DeepSeek-V2.5 enum: - deepseek-ai/DeepSeek-V2.5 - deepseek-ai/DeepSeek-V2-Chat - deepseek-ai/DeepSeek-Coder-V2-Instruct - Qwen/Qwen2.5-72B-Instruct-128K - Qwen/Qwen2.5-72B-Instruct - Qwen/Qwen2-VL-72B-Instruct - Qwen/Qwen2.5-32B-Instruct - Qwen/Qwen2.5-14B-Instruct - Qwen/Qwen2.5-7B-Instruct - Qwen/Qwen2.5-Math-72B-Instruct - Qwen/Qwen2.5-Coder-7B-Instruct - Qwen/Qwen2-72B-Instruct - Qwen/Qwen2-7B-Instruct - Qwen/Qwen2-1.5B-Instruct - Qwen/Qwen2-57B-A14B-Instruct - TeleAI/TeleChat2 - 01-ai/Yi-1.5-34B-Chat-16K - 01-ai/Yi-1.5-9B-Chat-16K - 01-ai/Yi-1.5-6B-Chat - THUDM/chatglm3-6b - THUDM/glm-4-9b-chat - Vendor-A/Qwen/Qwen2-72B-Instruct - Vendor-A/Qwen/Qwen2.5-72B-Instruct - internlm/internlm2_5-7b-chat - internlm/internlm2_5-20b-chat - OpenGVLab/InternVL2-Llama3-76B - OpenGVLab/InternVL2-26B - nvidia/Llama-3.1-Nemotron-70B-Instruct - meta-llama/Meta-Llama-3.1-405B-Instruct - meta-llama/Meta-Llama-3.1-70B-Instruct - meta-llama/Meta-Llama-3.1-8B-Instruct - meta-llama/Meta-Llama-3-8B-Instruct - meta-llama/Meta-Llama-3-70B-Instruct - google/gemma-2-27b-it - google/gemma-2-9b-it - Pro/Qwen/Qwen2.5-7B-Instruct - Pro/Qwen/Qwen2-7B-Instruct - Pro/Qwen/Qwen2-1.5B-Instruct - Pro/Qwen/Qwen2-VL-7B-Instruct - Pro/01-ai/Yi-1.5-9B-Chat-16K - Pro/01-ai/Yi-1.5-6B-Chat - Pro/THUDM/chatglm3-6b - Pro/THUDM/glm-4-9b-chat - Pro/internlm/internlm2_5-7b-chat - Pro/OpenGVLab/InternVL2-8B - Pro/meta-llama/Meta-Llama-3-8B-Instruct - Pro/meta-llama/Meta-Llama-3.1-8B-Instruct - Pro/google/gemma-2-9b-it messages: type: array description: A list of messages comprising the conversation so far. items: type: object properties: role: type: string description: 'The role of the messages author. Choice between: system, user, or assistant.' example: user default: user enum: - user - assistant - system content: oneOf: - type: string description: The contents of the message. example: SiliconCloud推出分层速率方案与免费模型RPM提升10倍,对于整个大模型应用领域带来哪些改变? default: SiliconCloud推出分层速率方案与免费模型RPM提升10倍,对于整个大模型应用领域带来哪些改变? - type: array description: An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4o` model. items: $ref: "#/components/schemas/ChatCompletionRequestUserMessageContentPart" minItems: 1 required: - role - content minItems: 1 maxItems: 10 stream: type: boolean description: "If set, tokens are returned as Server-Sent Events as they are made available. Stream terminates with `data: [DONE]`" example: false default: false max_tokens: type: integer description: The maximum number of tokens to generate. example: 512 default: 512 minimum: 1 maximum: 4096 stop: description: > Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. default: null nullable: true oneOf: - type: string default: <|endoftext|> example: "\n" nullable: true - type: array minItems: 1 maxItems: 4 items: type: string example: '["\n"]' temperature: type: number description: Determines the degree of randomness in the response. format: float example: 0.7 default: 0.7 top_p: type: number description: The `top_p` (nucleus) parameter is used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. format: float example: 0.7 default: 0.7 top_k: type: number format: float example: 50 default: 50 frequency_penalty: type: number format: float example: 0.5 default: 0.5 n: type: integer description: Number of generations to return example: 1 default: 1 response_format: type: object description: 'An object specifying the format that the model must output.' properties: type: type: string description: 'The type of the response format.' example: text ChatCompletionResponse: type: object properties: id: type: string choices: $ref: "#/components/schemas/ChatCompletionChoicesData" usage: $ref: "#/components/schemas/UsageData" created: type: integer model: type: string object: type: string enum: - chat.completion ChatCompletionStream: type: object properties: id: type: string choices: $ref: "#/components/schemas/ChatCompletionChoicesData" created: type: integer model: type: string object: type: string enum: - chat.completion.chunk ChatCompletionEvent: type: object required: [ data ] properties: data: $ref: "#/components/schemas/ChatCompletionChunk" ChatCompletionChunk: type: object required: [ id, object, created, token, choices ] properties: id: type: string object: type: string enum: - chat.completion.chunk created: type: integer token: $ref: "#/components/schemas/ChatCompletionToken" choices: title: ChatCompletionChoices type: array items: $ref: "#/components/schemas/ChatCompletionChoice" usage: allOf: - $ref: "#/components/schemas/UsageData" - nullable: true finish_reason: allOf: - $ref: "#/components/schemas/FinishReason" - nullable: true ChatCompletionToken: type: object required: [ id, text, logprob, special ] properties: id: type: integer text: type: string logprob: type: number format: float special: type: boolean ChatCompletionChoice: type: object required: [ index, delta ] properties: index: type: integer delta: title: ChatCompletionChoiceDelta type: object required: [ content ] properties: content: type: string upload_image: title: Upload Image type: string default: data:image/webp;base64, XXX stable-diffusion-3-5-large: title: stable-diffusion-3-5-large type: object required: - model - prompt - image_size - batch_size - num_inference_steps - guidance_scale properties: model: type: string default: stabilityai/stable-diffusion-3-5-large enum: - stabilityai/stable-diffusion-3-5-large prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea negative_prompt: title: Negative Prompt type: string image_size: title: Image Size enum: - 1024x1024 - 512x1024 - 768x512 - 768x1024 - 1024x576 - 576x1024 default: 1024x1024 batch_size: title: Number Images type: integer minimum: 1 maximum: 4 default: 1 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 num_inference_steps: title: Number Inference Steps type: integer minimum: 1 maximum: 100 default: 20 guidance_scale: title: Guidance Scale type: number minimum: 0 maximum: 100 default: 7.5 FLUX.1-schnell: title: FLUX.1-schnell type: object required: - model - prompt - image_size properties: model: type: string default: black-forest-labs/FLUX.1-schnell enum: - black-forest-labs/FLUX.1-schnell prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea image_size: title: Image Size enum: - 1024x1024 - 512x1024 - 768x512 - 768x1024 - 1024x576 - 576x1024 default: 1024x1024 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 Pro-FLUX.1-schnell: title: Pro-FLUX.1-schnell type: object required: - model - prompt - image_size properties: model: type: string default: Pro/black-forest-labs/FLUX.1-schnell enum: - Pro/black-forest-labs/FLUX.1-schnell prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea image_size: title: Image Size, format:"[width]x[height]", the maximum pixel size is 2359296. enum: - 1024x1024 - 960x1280 - 768x1024 - 720x1440 - 720x1280 - others default: 1024x1024 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 FLUX.1-dev: title: FLUX.1-dev type: object required: - model - prompt - image_size - num_inference_steps properties: model: type: string description: The name of the model to query. default: black-forest-labs/FLUX.1-dev enum: - black-forest-labs/FLUX.1-dev prompt: type: string default: a man image_size: title: Image Size, format:"[width]x[height]", the maximum pixel size is 2359296. enum: - 1024x1024 - 960x1280 - 768x1024 - 720x1440 - 720x1280 - others default: 1024x1024 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 num_inference_steps: title: Number Inference Steps type: integer minimum: 1 maximum: 30 default: 20 stable-diffusion-3-medium: title: stable-diffusion-3-medium type: object required: - model - prompt - image_size - batch_size - num_inference_steps - guidance_scale properties: model: type: string default: stabilityai/stable-diffusion-3-medium enum: - stabilityai/stable-diffusion-3-medium prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea negative_prompt: title: Negative Prompt type: string image_size: title: Image Size enum: - 1024x1024 - 960x1280 - 768x1024 - 720x1440 - 720x1280 - others default: 1024x1024 batch_size: title: Number Images type: integer minimum: 1 maximum: 4 default: 1 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 num_inference_steps: title: Number Inference Steps type: integer minimum: 1 maximum: 100 default: 20 guidance_scale: title: Guidance Scale type: number minimum: 0 maximum: 100 default: 7.5 stable-diffusion-xl-base-1.0: title: stable-diffusion-xl-base-1.0 type: object required: - model - prompt - image_size - batch_size - num_inference_steps - guidance_scale properties: model: type: string default: stabilityai/stable-diffusion-xl-base-1.0 enum: - stabilityai/stable-diffusion-xl-base-1.0 prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea negative_prompt: title: Negative Prompt type: string image_size: title: Image Size enum: - 1024x1024 - 960x1280 - 768x1024 - 720x1440 - 720x1280 - others default: 1024x1024 batch_size: title: Number Images type: integer minimum: 1 maximum: 4 default: 1 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 num_inference_steps: title: Number Inference Steps type: integer minimum: 1 maximum: 100 default: 20 guidance_scale: title: Guidance Scale type: number minimum: 0 maximum: 100 default: 7.5 image: $ref: "#/components/schemas/upload_image" stable-diffusion-2-1: title: stable-diffusion-2-1 type: object required: - model - prompt - image_size - batch_size - num_inference_steps - guidance_scale properties: model: type: string default: stabilityai/stable-diffusion-2-1 enum: - stabilityai/stable-diffusion-2-1 prompt: type: string default: an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea negative_prompt: title: Negative Prompt type: string image_size: title: Image Size enum: - 512x512 - 512x1024 - 768x512 - 768x1024 - 1024x576 - 576x1024 default: 512x512 batch_size: title: Number Images type: integer minimum: 1 maximum: 4 default: 1 seed: title: Seed type: integer minimum: 0 maximum: 9999999999 num_inference_steps: title: Number Inference Steps type: integer minimum: 1 maximum: 100 default: 20 guidance_scale: title: Guidance Scale type: number minimum: 0 maximum: 100 default: 7.5 image: $ref: "#/components/schemas/upload_image" ImagesGenerationResponse: type: object properties: images: type: array items: type: object properties: url: type: string timings: type: object properties: inference: type: number format: float seed: type: integer