The text generation application offers non-session support and is ideal for translation, article writing, summarization AI, and more.
The Service API uses API-Key authentication.
Important: Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
For all API requests, include your API Key in the Authorization HTTP Header:
POST /completion-messages
Send a request to the text generation application.
inputs (object) Required
response_mode (string) Required
streaming
: Streaming mode (recommended), implements typewriter-like output through SSEblocking
: Blocking mode, returns result after execution completes
user (string) Required
files (array[object]) Optional
type
(string): Supported type: imagetransfer_method
(string): ‘remote_url’ or ‘local_file’url
(string): Image URL (for remote_url)upload_file_id
(string): Uploaded file ID (for local_file)Blocking Mode Response Returns a CompletionResponse object with Content-Type: application/json
Streaming Mode Response Returns ChunkCompletionResponse stream with Content-Type: text/event-stream
Events:
message
: LLM text chunk eventmessage_end
: Stream end eventmessage_replace
: Content replacement eventerror
: Exception eventping
: Keep-alive event (every 10s)POST /files/upload
Upload files (currently only images) for multimodal understanding.
Requires multipart/form-data:
file
(File) Requireduser
(string) RequiredPOST /completion-messages/:task_id/stop
Stop ongoing generation (streaming mode only).
user
(string) RequiredPOST /messages/:message_id/feedbacks
Submit user feedback on messages.
rating
(string) Required: “like” | “dislike” | nulluser
(string) RequiredGET /parameters
Retrieve application configuration and parameters.
user
(string) RequiredCommon error codes you may encounter:
The text generation application offers non-session support and is ideal for translation, article writing, summarization AI, and more.
The Service API uses API-Key authentication.
Important: Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
For all API requests, include your API Key in the Authorization HTTP Header:
POST /completion-messages
Send a request to the text generation application.
inputs (object) Required
response_mode (string) Required
streaming
: Streaming mode (recommended), implements typewriter-like output through SSEblocking
: Blocking mode, returns result after execution completes
user (string) Required
files (array[object]) Optional
type
(string): Supported type: imagetransfer_method
(string): ‘remote_url’ or ‘local_file’url
(string): Image URL (for remote_url)upload_file_id
(string): Uploaded file ID (for local_file)Blocking Mode Response Returns a CompletionResponse object with Content-Type: application/json
Streaming Mode Response Returns ChunkCompletionResponse stream with Content-Type: text/event-stream
Events:
message
: LLM text chunk eventmessage_end
: Stream end eventmessage_replace
: Content replacement eventerror
: Exception eventping
: Keep-alive event (every 10s)POST /files/upload
Upload files (currently only images) for multimodal understanding.
Requires multipart/form-data:
file
(File) Requireduser
(string) RequiredPOST /completion-messages/:task_id/stop
Stop ongoing generation (streaming mode only).
user
(string) RequiredPOST /messages/:message_id/feedbacks
Submit user feedback on messages.
rating
(string) Required: “like” | “dislike” | nulluser
(string) RequiredGET /parameters
Retrieve application configuration and parameters.
user
(string) RequiredCommon error codes you may encounter: