This page shows how to call the site chat endpoint for each use case: text chat, image recognition, image generation, speech recognition, speech generation and video generation. The module lists and curl examples in each section are generated from the modules currently enabled on this site; modules that are not enabled are not shown.
Every use case calls the same endpoint; only module and its parameters change:
POST https://www.myai168.com/en/ai/chat/chat
Authenticate with your developer API key in the Authorization: Bearer YOUR_API_KEY header (the X-Dev-Key header is also accepted). Replace YOUR_API_KEY in the examples with your own key. Get a key at: https://www.myai168.com/en/ai/user/developer
Send the request as a form: use application/x-www-form-urlencoded for text-only requests (curl --data-urlencode) and multipart/form-data when uploading files (curl -F, with @ before the file name). Add -N to curl so the stream prints in real time.
On this site the total size of one request, including all uploaded files, is limited to 512 MB; larger requests are rejected with HTTP 413.
| Parameter | Type | Required | Description |
|---|---|---|---|
module | string | required | Module code. default means the default model of this site; the codes available for each use case are listed in the sections below. |
input | string | depends on the module | The question, instruction or content for the module. Required for text chat and all generation use cases; not needed for speech recognition. |
upload_file[] | file | depends on the module | Uploaded files; repeat the field to upload several files (multipart/form-data). Image recognition and speech recognition require a file. |
session_sn | integer | optional | Conversation id. Omit it on the first call; modules that support continuous conversation emit data: {"session_sn": N} in the stream — send the same value back on every follow-up call. |
search_internet | boolean | optional | Set to true to let the model search the web before answering (only on models that support web search; each search is billed). |
effort | string | optional | Reasoning effort (reasoning models only; accepted values depend on the model, the model default applies when omitted). |
display | string | optional | Set to summarized to append a summary of the thinking process to the reply (only on reasoning models that support it; the default omitted hides it). |
param2 / param3 / param4 | string | depends on the module | Module-specific parameters (for example the language for speech recognition or the voice for speech generation); see each section. |
Image and video generation modules accept additional fields (for example quality, aspect_ratio, resolution, duration) described in their sections; fields a module does not use are ignored.
| Module code | Name |
|---|---|
search | Search |
default | Site Default Model |
agent | AI Agent |
gemini_4_argon | Google Gemini 4 Argon |
gemini_3_8_flash | Google Gemini 3.8 Flash |
gemini_3_8_live | Live Voice Conversation gemini-3.8-live |
gemini_3_8_live_extended_thinking | Live Voice Conversation gemini-3.8-live-extended-thinking |
gemini_3_6_flash | Google Gemini 3.6 Flash |
gemini_3_5_flash_lite | Google Gemini 3.5 Flash Lite |
gemini_3_1_pro | Google Gemini 3.1 Pro |
gemini_3_1_flash_live | Live Voice Conversation gemini-3.1-flash-live |
gemini_3_1_flash_lite | Google Gemini 3.1 Flash Lite |
claude_fable_5_1 | Anthropic Claude Fable 5.1 |
claude_fable_5 | Anthropic Claude Fable 5 |
claude_opus_5_5 | Anthropic Claude Opus 5.5 |
claude_opus_5 | Anthropic Claude Opus 5 |
claude_opus_4_8 | Anthropic Claude Opus 4.8 |
claude_sonnet_5_5 | Anthropic Claude Sonnet 5.5 |
claude_sonnet_5 | Anthropic Claude Sonnet 5 |
claude_haiku_5_5 | Anthropic Claude Haiku 5.5 |
claude_haiku_4_5 | Anthropic Claude Haiku 4.5 |
gpt_6_astra | OpenAI GPT-6 Astra |
gpt_6_1_sol | OpenAI GPT-6.1 Sol |
gpt_6_sol | OpenAI GPT-6 Sol |
gpt_6_luna | OpenAI GPT-6 Luna |
openai_decisions | OpenAI Decisions |
gpt_5_6_sol | OpenAI GPT-5.6 Sol |
gpt_5_6_terra | OpenAI GPT-5.6 Terra |
gpt_5_6_luna | OpenAI GPT-5.6 Luna |
chatgpt_5_5 | OpenAI ChatGPT 5.5 |
chatgpt_5_4_mini | OpenAI ChatGPT 5.4 mini |
chatgpt_5_4_nano | OpenAI ChatGPT 5.4 nano |
perplexity_sonar_deep_research | Perplexity Sonar Deep Research |
perplexity_sonar_reasoning_pro | Perplexity Sonar Reasoning Pro |
perplexity_sonar_pro | Perplexity Sonar Pro |
grok_4_7 | xAI Grok 4.7 |
grok_4_6 | xAI Grok 4.6 |
grok_4_5 | xAI Grok 4.5 |
muse_spark_1.3 | Meta Muse Spark 1.3 |
kimi_k3 | Kimi K3 |
glm_5_2 | GLM 5.2 |
qwen3.5_397b_a17b | Qwen 3.5 397B A17B |
knowledge_chunk | Knowledge Chunk Splitter |
meeting_minutes | Meeting Minutes |
notes | Note Organizer |
slide_outline | Slide Outline |
slide2 | Slide Generation 2 |
slide | Slide Generation |
editor | AI Copywriter / Copywriting |
official_document | Official Document Writing |
chatpdf | Chat with PDF (Text Only) |
homework | Homework Assistant |
social_media_content_improver | Social Post Optimization |
contract | Contract Review |
report | Report Generation |
webpage_summary | Webpage Summary |
google_search | Google Search |
google_news | Google News |
paper | Paper Writing |
speech_to_text | Speech Recognition |
gpt_transcribe | Speech Recognition gpt_transcribe |
whisper_1 | Speech Recognition whisper_1 |
gpt_4o_transcribe_diarize | Multi-Speaker Speech Recognition |
programming | Programming Assistant |
plan | Project Plan Writing |
news_report | Press Release |
news_oral_report | Oral News Broadcast Script |
ocr | Image OCR |
document_ocr_to_md | Document OCR to Markdown |
document_ocr_to_docx | Document OCR to DOCX |
gai_article_detector | AI Content Detector |
summary_500 | 500-Word Summary |
summary_1000 | 1000-Word Summary |
writing_optimizer | Writing Optimization |
essay_grading | Essay Grading |
zenrows | Web Crawler |
get_text | Document Text Extraction |
gpt_image_2_5_flare | GPT Image 2.5 Flare Generation |
gpt_image_2_5_sunburst | GPT Image 2.5 Sunburst Generation |
gemini_nano_banana_2_1 | Nano Banana 2.1 |
nano_banana_pro | Nano Banana Pro |
nano_banana_3_1_flash | Nano Banana 3.1 Flash |
image_to_prompt | Image-to-Prompt |
gemini_omni_flash_1_1 | Gemini Omni Flash 1.1 Video Generation |
music | Music Generation |
music_extend | Extend Song |
music_cover | Song Restyle |
music_voice | Sing with Your Voice |
music_stems | Vocal & Instrumental Separation |
change_clothes | AI Change Clothes |
seedream_5_0 | BytePlus Seedream 5.0 Pro Text-to-Image |
seedance_2_5 | seedance 2.5 Generate Video |
seedance_2_0 | seedance 2.0 Generate Video |
cheer_video | Cheer Video Generation |
christmas_video | Christmas Video Generation |
rich_new_year_video | New Year Video Generation |
gemini_3_8_flash_tts | Google Gemini 3.8 Flash Text to Speech |
gemini_3_8_flash_lite_tts | Google Gemini 3.8 Flash-Lite Text to Speech |
gemini_2_5_flash_tts | Google Gemini 2.5 Flash Text to Speech |
gemini_2_5_pro_tts | Google Gemini 2.5 Pro Text to Speech |
text_to_speech_byteplus | BytePlus Seed-TTS |
seedaudio_1_0 | BytePlus SeedAudio 1.0 Audio Generation |
voice_replication | BytePlus Voice Cloning |
translate_to_tc | Translate to Traditional Chinese |
translate_to_english | Translate to English |
english_gramma | English Grammar Check |
speak_female | Multilingual Voice Tutor (Female) - Sophie |
speak_male | Multilingual Voice Tutor (Male) - Alex |
travel_translator | Travel Translator |
gemini_3.5_live_translate | Live Voice Translation gemini-3.5-live-translate |
gpt_live_transcribe | Live Transcription gpt_live_transcribe |
sc2tc | Simplified to Traditional |
tc2sc | Traditional to Simplified |
simplified_chinese_detector | Simplified Chinese Detector |
check_typo | Typo Checker |
health_education | Health Education |
Every successful call is billed to your account credits according to the model pricing, and the reply ends with a usage summary; failed or interrupted calls are never charged. Errors are returned as text inside the stream with HTTP 200 (for example an invalid key, insufficient credits or a module that is not enabled), not as HTTP error codes; a request larger than the size limit is rejected with HTTP 413.
| Situation | Message in the stream | Where it appears |
|---|---|---|
| Missing or invalid key | A "Log in" link | html event |
| The key has reached its credit limit | API key credit limit reached! | html event |
| API access is not enabled on this site | This site does not provide API access. | html event |
| Insufficient credits | Please top up! / Insufficient credits. Please top up! | html event |
| The model service is temporarily unavailable, or the model rejected the request | A text message explaining the reason (service errors start with ERROR! and include the UTC time) | Text chunks |
None of these cases is charged. Suggested handling: if the stream ends without any reply text or output file, treat the content of the html events as the failure reason; the wording follows the site language, so do not match whole sentences exactly.
Questions, writing, translation, programming and other text work all use text chat: put a text model code in module and your question in input; the reply is streamed piece by piece.
default means the default model of this site. To use a specific model, replace it with any code in the “Module codes available on this site” list of the quick start section.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=default" \ --data-urlencode "input=Hello, please introduce yourself."
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=default" \ --data-urlencode "search_internet=true" \ --data-urlencode "input=Summarize today's top technology news."
search_internet only takes effect on modules that support web search; each search is billed.
On the first call, omit session_sn. Read the data: {"session_sn": N} event from the stream and save the value, then send it back on every follow-up call of the same conversation.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=default" \ --data-urlencode "input=Recommend three books about time management."
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=default" \ --data-urlencode "session_sn=YOUR_SESSION_SN" \ --data-urlencode "input=Which one is best for beginners?"
Replace YOUR_SESSION_SN with the value returned by the first call.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=claude_opus_5_5" \ --data-urlencode "effort=high" \ --data-urlencode "input=Prove that the square root of 2 is irrational."
effort sets how hard a reasoning model thinks (common values: low, medium, high; some models also accept minimal, xhigh, max). Accepted values depend on the model; the model default applies when omitted. display set to summarized appends a summary of the thinking process to the reply on models that support it.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=openai_decisions" \ --data-urlencode "param2=choice" \ --data-urlencode "param3=Which department should handle this complaint?" \ --data-urlencode "param4=billing|Payments, invoices and refunds technical|Problems using the product shipping|Delivery and tracking other|Anything else" \ --data-urlencode "input=I was charged twice for my order."
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=openai_decisions" \ -F "param2=predicate" \ -F "param3=Does this photo show a damaged product?" \ -F "upload_file[]=@photo.jpg"
param2 is the question type (predicate, choice, score), param3 is the question or condition, and param4 lists the options (choice) or levels (score) one per line as value|description. The reply is a table with the probability of each option and a confidence value. Upload images with upload_file[] to evaluate pictures; when param3 is omitted, the input text is used as the question and the images as the evidence.
Upload an image and ask about it in input; a module that accepts images answers based on the picture (describing it, reading text, analysing charts and so on). Upload images in the upload_file[] field of a multipart/form-data request.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=default" \ -F "input=What is in this picture? Please describe it in detail." \ -F "upload_file[]=@photo.jpg"
Repeat upload_file[] to send several images in one call. Accepted formats, image count and size limits depend on the module.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=ocr" \ -F "input=Extract all the text in this image." \ -F "upload_file[]=@scan.png"
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://www.myai168.com/en/ai/chat/chat";
string imagePath = "scan.png";
using var http = new HttpClient { Timeout = TimeSpan.FromMinutes(10) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("ocr"), "module");
form.Add(new StringContent("Extract all the text in this image."), "input");
form.Add(new ByteArrayContent(await File.ReadAllBytesAsync(imagePath)),
"upload_file[]", Path.GetFileName(imagePath));
using var request = new HttpRequestMessage(HttpMethod.Post, url) { Content = form };
using var response = await http.SendAsync(
request, HttpCompletionOption.ResponseHeadersRead);
response.EnsureSuccessStatusCode();
var text = new StringBuilder();
var notice = new StringBuilder();
using var reader = new StreamReader(
await response.Content.ReadAsStreamAsync(), Encoding.UTF8);
string? line;
while ((line = await reader.ReadLineAsync()) != null)
{
if (!line.StartsWith("data: "))
{
continue;
}
using var doc = JsonDocument.Parse(line.Substring(6));
JsonElement root = doc.RootElement;
if (root.TryGetProperty("html", out JsonElement html))
{
notice.AppendLine(html.GetString());
continue;
}
if (!root.TryGetProperty("choices", out JsonElement choices)
|| choices.GetArrayLength() == 0)
{
continue;
}
JsonElement choice = choices[0];
if (choice.TryGetProperty("delta", out JsonElement delta)
&& delta.TryGetProperty("content", out JsonElement content)
&& content.ValueKind == JsonValueKind.String)
{
text.Append(content.GetString());
}
if (choice.TryGetProperty("finish_reason", out JsonElement finish)
&& finish.ValueKind == JsonValueKind.String
&& finish.GetString() == "stop")
{
break;
}
}
Console.OutputEncoding = Encoding.UTF8;
Console.WriteLine(text.Length > 0 ? text.ToString() : notice.ToString());
}
}
Requires .NET 6 or later. The example uploads scan.png with MultipartFormDataContent, reads the stream line by line and joins the text in choices[0].delta.content; when the stream ends without any text, the content of the html events is the reason for the failure. Keep the file extension in the uploaded file name, because the image format is determined from it.
| Module code | Name | Note |
|---|---|---|
default | Site Default Model | This site default model. |
gemini_4_argon | Google Gemini 4 Argon | — |
gemini_3_8_flash | Google Gemini 3.8 Flash | — |
gemini_3_6_flash | Google Gemini 3.6 Flash | — |
gemini_3_5_flash_lite | Google Gemini 3.5 Flash Lite | — |
gemini_3_1_pro | Google Gemini 3.1 Pro | — |
gemini_3_1_flash_lite | Google Gemini 3.1 Flash Lite | — |
claude_fable_5_1 | Anthropic Claude Fable 5.1 | — |
claude_fable_5 | Anthropic Claude Fable 5 | — |
claude_opus_5_5 | Anthropic Claude Opus 5.5 | — |
claude_opus_5 | Anthropic Claude Opus 5 | — |
claude_opus_4_8 | Anthropic Claude Opus 4.8 | — |
claude_sonnet_5_5 | Anthropic Claude Sonnet 5.5 | — |
claude_sonnet_5 | Anthropic Claude Sonnet 5 | — |
claude_haiku_5_5 | Anthropic Claude Haiku 5.5 | — |
claude_haiku_4_5 | Anthropic Claude Haiku 4.5 | — |
gpt_6_astra | OpenAI GPT-6 Astra | — |
gpt_6_1_sol | OpenAI GPT-6.1 Sol | — |
gpt_6_sol | OpenAI GPT-6 Sol | — |
gpt_6_luna | OpenAI GPT-6 Luna | — |
openai_decisions | OpenAI Decisions | — |
gpt_5_6_sol | OpenAI GPT-5.6 Sol | — |
gpt_5_6_terra | OpenAI GPT-5.6 Terra | — |
gpt_5_6_luna | OpenAI GPT-5.6 Luna | — |
chatgpt_5_5 | OpenAI ChatGPT 5.5 | — |
chatgpt_5_4_mini | OpenAI ChatGPT 5.4 mini | — |
chatgpt_5_4_nano | OpenAI ChatGPT 5.4 nano | — |
perplexity_sonar_deep_research | Perplexity Sonar Deep Research | — |
perplexity_sonar_reasoning_pro | Perplexity Sonar Reasoning Pro | — |
perplexity_sonar_pro | Perplexity Sonar Pro | — |
grok_4_7 | xAI Grok 4.7 | — |
grok_4_6 | xAI Grok 4.6 | — |
grok_4_5 | xAI Grok 4.5 | — |
muse_spark_1.3 | Meta Muse Spark 1.3 | — |
kimi_k3 | Kimi K3 | — |
qwen3.5_397b_a17b | Qwen 3.5 397B A17B | — |
ocr | Image OCR | Requires at least one image file. |
image_to_prompt | Image-to-Prompt | Requires at least one image file. |
Describe the picture you want in input to generate an image; upload a reference image to edit it, or send back session_sn to keep editing the previous result. Generated images are returned as download links (see “Reading the response and getting output files”).
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gpt_image_2_5_flare" \ --data-urlencode "input=A cat sitting on a desk, digital illustration"
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=gpt_image_2_5_flare" \ -F "input=Change the background to a beach at sunset" \ -F "upload_file[]=@photo.png"
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gpt_image_2_5_flare" \ --data-urlencode "session_sn=YOUR_SESSION_SN" \ --data-urlencode "input=Make the cat wear a red scarf"
Image modules that support continuous editing emit data: {"session_sn": N} on the first call; send it back and the previous result is used as the source image when no new image is uploaded.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gpt_image_2_5_flare" \ --data-urlencode "quality=high" \ --data-urlencode "input=A watercolor painting of a lighthouse at dawn"
| Parameter | Required | Description |
|---|---|---|
upload_file[] | Optional (may be omitted) | Reference or source images for editing (multipart/form-data, multiple files allowed). Modules marked below as requiring an image cannot run without one. |
session_sn | Optional (may be omitted) | Continue editing the image generated by the previous call (modules that support continuous editing only). |
quality | Optional (may be omitted) | Image quality for gpt_image_2_5_flare, gpt_image_2_5_sunburst: auto, low, medium, high, xhigh, max (auto, the default, lets the model decide). Higher quality produces more output and costs more credits. |
| Module code | Name | Note |
|---|---|---|
gpt_image_2_5_flare | GPT Image 2.5 Flare Generation | Reference images accepted. Continuous editing supported. Image output size: chosen automatically by the model from the prompt; commonly 1024x1024, 1024x1536, or 1536x1024 pixels, and other resolutions are possible (longest edge up to 3840 pixels). |
gpt_image_2_5_sunburst | GPT Image 2.5 Sunburst Generation | Reference images accepted. Continuous editing supported. Image output size: chosen automatically by the model from the prompt; commonly 1024x1024, 1024x1536, or 1536x1024 pixels, and other resolutions are possible (longest edge up to 3840 pixels). |
gemini_nano_banana_2_1 | Nano Banana 2.1 | Reference images accepted. Continuous editing supported. Image output size: 1K (about 1024x1024 pixels). |
nano_banana_pro | Nano Banana Pro | Reference images accepted. Continuous editing supported. Image output size: 1K (about 1024x1024 pixels). |
nano_banana_3_1_flash | Nano Banana 3.1 Flash | Reference images accepted. Continuous editing supported. Image output size: 1K (about 1024x1024 pixels). |
change_clothes | AI Change Clothes | Requires at least one image file. Image output size: 2K class (about 2048x2048 pixels at 1:1; the aspect ratio is decided by the model from the prompt or reference image). |
seedream_5_0 | BytePlus Seedream 5.0 Pro Text-to-Image | Reference images accepted. Continuous editing supported. Image output size: 2K class (about 2048x2048 pixels at 1:1; the aspect ratio is decided by the model from the prompt or reference image). |
Upload an audio file to turn speech into text; you can set the language, and some modules can output SRT subtitles.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=speech_to_text" \ -F "param2=en" \ -F "upload_file[]=@speech.mp3"
input is not needed: speech recognition modules do not use typed text.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=speech_to_text" \ -F "param2=en" \ -F "param3=on" \ -F "upload_file[]=@speech.mp3"
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=speech_to_text" \ -F "param2=en" \ -F "hint=Lin Mei-ling, TSMC, Kubernetes" \ -F "upload_file[]=@speech.mp3"
| Parameter | Required | Description |
|---|---|---|
upload_file[] | Required | The audio file to transcribe. Accepted formats and size limits depend on the module. |
param2 | Optional (may be omitted) | Language of the audio as a two-letter ISO 639-1 code, e.g. zh, en, ja, ko. When omitted, the default language of this site is used. With zh the transcript is output in Traditional Chinese. |
param3 | Optional (may be omitted) | Set to on to output the transcript in SRT subtitle format (only on modules marked below; other modules reply that SRT is not supported and are not charged). |
hint | Optional (may be omitted) | Names and terms that may appear in the audio, separated by commas, e.g. Lin Mei-ling, TSMC, Kubernetes. Helps the module spell proper nouns correctly. Line breaks are removed and only the first 200 characters are used. Modules marked below as unsupported ignore it and say so in the reply. |
| Module code | Name | SRT subtitles | Name and term hints |
|---|---|---|---|
speech_to_text | Speech Recognition | Supported | Supported |
gpt_transcribe | Speech Recognition gpt_transcribe | Unsupported | Supported |
whisper_1 | Speech Recognition whisper_1 | Supported | Supported |
gpt_4o_transcribe_diarize | Multi-Speaker Speech Recognition | Unsupported | Unsupported |
Turn the text in input into speech, choosing the voice and language with param2 and related parameters; the output is a download link to an MP3 file.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gemini_3_8_flash_tts" \ --data-urlencode "param2=Kore" \ --data-urlencode "param3=en-US" \ --data-urlencode "param4=Warm and cheerful" \ --data-urlencode "input=Welcome to our website. We hope you have a wonderful day."
| Parameter | Required | Description |
|---|---|---|
input | Required | The text to read aloud. |
param2 | Optional (may be omitted) | Voice name (case-insensitive; Kore when omitted). See the voice list below. |
param3 | Optional (may be omitted) | Language code (BCP-47, e.g. cmn-CN, en-US, ja-JP). When omitted the language is detected automatically. |
param4 | Optional (may be omitted) | Speaking style for gemini_3_8_flash_tts, gemini_3_8_flash_lite_tts, e.g. Warm and cheerful. You can also put it on the first line of input as Style: Warm and cheerful; that line is not read aloud. |
The same parameters apply to gemini_3_8_flash_tts, gemini_3_8_flash_lite_tts, gemini_2_5_flash_tts, gemini_2_5_pro_tts.
| Value | Description |
|---|---|
Zephyr | Bright |
Puck | Upbeat |
Charon | Informative |
Kore | Firm |
Fenrir | Excited |
Leda | Young |
Orus | Firm |
Aoede | Breezy |
Callirrhoe | Easygoing |
Autonoe | Bright |
Enceladus | Breathy |
Iapetus | Clear |
Umbriel | Easygoing |
Algieba | Smooth |
Despina | Smooth |
Erinome | Clear |
Algenib | Gravelly |
Rasalgethi | Informative |
Laomedeia | Upbeat |
Achernar | Soft |
Alnilam | Firm |
Schedar | Even |
Gacrux | Warm |
Pulcherrima | Forward |
Achird | Friendly |
Zubenelgenubi | Casual |
Vindemiatrix | Gentle |
Sadachbia | Lively |
Sadaltager | Knowledgeable |
Sulafat | Warm |
| Value | Description |
|---|---|
de-DE | German (Germany) |
en-AU | English (Australia) |
en-GB | English (United Kingdom) |
en-IN | English (India) |
en-US | English (United States) |
es-US | Spanish (United States) |
fr-FR | French (France) |
hi-IN | Hindi |
pt-BR | Portuguese (Brazil) |
ar-XA | Arabic |
es-ES | Spanish (Spain) |
fr-CA | French (Canada) |
id-ID | Indonesian (Indonesia) |
it-IT | Italian (Italy) |
ja-JP | Japanese (Japan) |
tr-TR | Turkish (Turkey) |
vi-VN | Vietnamese (Vietnam) |
bn-IN | Bengali (India) |
gu-IN | Gujarati (India) |
kn-IN | Kannada (India) |
ml-IN | Malayalam (India) |
mr-IN | Marathi (India) |
ta-IN | Tamil (India) |
te-IN | Telugu (India) |
nl-NL | Dutch (Netherlands) |
ko-KR | Korean (South Korea) |
cmn-CN | Chinese |
pl-PL | Polish (Poland) |
ru-RU | Russian (Russia) |
th-TH | Thai (Thailand) |
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=text_to_speech_byteplus" \ --data-urlencode "param2=zh_female_wanwanxiaohe_moon_bigtts" \ --data-urlencode "input=Welcome to our website. We hope you have a wonderful day."
| Parameter | Required | Description |
|---|---|---|
input | Required | The text to read aloud. |
param2 | Required | Voice id. See the voice list below. |
| Value | Description |
|---|---|
zh_female_wanwanxiaohe_moon_bigtts | Isabella - Sweet Taiwanese |
zh_female_cancan_mars_bigtts | Luna - Bright All-Purpose Female |
zh_male_baqiqingshu_mars_bigtts | Edward - Bold Mature Male |
zh_female_wenroushunv_mars_bigtts | Emma - Gentle Lady |
zh_female_shaoergushi_mars_bigtts | Tina - Children's Stories |
zh_male_silang_mars_bigtts | William - Magnetic Male |
zh_male_jieshuonansheng_mars_bigtts | James - Narration Male |
zh_female_jitangmeimei_mars_bigtts | Grace - Warmhearted Girl |
zh_female_tiexinnvsheng_mars_bigtts | Sophia - Caring Female |
zh_female_qiaopinvsheng_mars_bigtts | Mia - Playful Female |
zh_female_mengyatou_mars_bigtts | Ava - Cute Girl |
zh_female_qingxinnvsheng_mars_bigtts | Olivia - Fresh Female |
zh_female_linjia_mars_bigtts | Lily - Girl Next Door |
en_female_anna_mars_bigtts | Anna - Gentle American |
en_male_adam_mars_bigtts | Adam - Clear American |
en_female_sarah_mars_bigtts | Sarah - Australian Female |
en_male_dryw_mars_bigtts | Dryw - Deep Australian |
en_male_smith_mars_bigtts | Smith - Deep British |
zh_male_guozhoudege_moon_bigtts | Andrew - Cantonese Male |
zh_female_daimengchuanmei_moon_bigtts | Elena - Sichuan Cute Girl |
zh_male_jingqiangkanye_moon_bigtts | Thomas - Beijing Chatter |
zh_female_wanqudashu_moon_bigtts | Robert - Playful Uncle |
zh_female_gaolengyujie_moon_bigtts | Charlotte - Cool Elegant Female |
zh_male_wennuanahu_moon_bigtts | Mark - Warm Male |
zh_female_linjianvhai_moon_bigtts | Lila - Fresh Girl Next Door |
zh_male_shaonianzixin_moon_bigtts | Ethan - Confident Youth |
zh_male_yuanboxiaoshu_moon_bigtts | Joseph - Knowledgeable Male |
zh_male_yangguangqingnian_moon_bigtts | George - Sunny Young Male |
zh_female_shuangkuaisisi_moon_bigtts | Aria - Lively Female |
multi_female_shuangkuaisisi_moon_bigtts | Haruko - Energetic Female (JA/ES) |
multi_male_jingqiangkanye_moon_bigtts | Kazune - Male (JA/ES) |
multi_female_gaolengyujie_moon_bigtts | Akemi - Cool Female (JA) |
multi_male_wanqudashu_moon_bigtts | Hiroshi - Mature Male (JA/ES) |
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=voice_replication" \ -F "input=Welcome to our website. We hope you have a wonderful day." \ -F "upload_file[]=@voice_sample.mp3"
Upload a clear recording of the voice to imitate (upload_file[]) and put the text to read in input.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=seedaudio_1_0" \ --data-urlencode "input=Gentle rain on a window with distant thunder, calm atmosphere"
Describe the sound effects, voice or atmosphere in input. Optionally attach up to 3 reference audio clips (cite them in the text as @Audio1, @Audio2 …) or one reference image; audio and images cannot be mixed.
| Module code | Name | Note |
|---|---|---|
gemini_3_8_flash_tts | Google Gemini 3.8 Flash Text to Speech | Audio output format: MP3. |
gemini_3_8_flash_lite_tts | Google Gemini 3.8 Flash-Lite Text to Speech | Audio output format: MP3. |
gemini_2_5_flash_tts | Google Gemini 2.5 Flash Text to Speech | Audio output format: MP3. |
gemini_2_5_pro_tts | Google Gemini 2.5 Pro Text to Speech | Audio output format: MP3. |
text_to_speech_byteplus | BytePlus Seed-TTS | Audio output format: MP3. |
seedaudio_1_0 | BytePlus SeedAudio 1.0 Audio Generation | Maximum text input: 3,000 characters. Audio output format: MP3 (up to 120 seconds). |
voice_replication | BytePlus Voice Cloning | Audio output format: MP3. |
Describe the scene in input to generate a video; you can set the aspect ratio, resolution and length, or upload images as the first frame and reference materials. The output is a download link to an MP4 file.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=seedance_2_5" \ --data-urlencode "aspect_ratio=16:9" \ --data-urlencode "resolution=1080p" \ --data-urlencode "duration=10" \ --data-urlencode "generate_audio=true" \ --data-urlencode "input=A cat jumping over a fence in slow motion, cinematic lighting"
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=seedance_2_5" \ -F "input=The flower slowly blooms" \ -F "first_frame=@start.jpg" \ -F "last_frame=@end.jpg"
| Parameter | Required | Description |
|---|---|---|
aspect_ratio | Optional (may be omitted) | Aspect ratio (default 16:9).seedance_2_5: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptiveseedance_2_0: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21 |
resolution | Optional (may be omitted) | Resolution for seedance_2_5: 720p, 1080p (default 720p). |
duration | Optional (may be omitted) | Video length in seconds for seedance_2_5: 4 to 30 (default 15). |
generate_audio | Optional (may be omitted) | true (default) generates sound with the video; false makes a silent video. |
first_frame | Optional (may be omitted) | Image file used as the first frame. |
last_frame | Optional (may be omitted) | Image file used as the last frame. |
keyframes[] | Optional (may be omitted) | Reference images (multiple files allowed). |
upload_file[] | Optional (may be omitted) | Reference images, videos or audio (multiple files allowed). |
The first/last frames cannot be combined with reference materials (keyframes[] or upload_file[]) in the same call; such a call is rejected before generation and not charged.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gemini_omni_flash_1_1" \ --data-urlencode "resolution=1080p" \ --data-urlencode "aspect_ratio=9:16" \ --data-urlencode "input=A cat jumping over a fence in slow motion, cinematic lighting"
| Parameter | Required | Description |
|---|---|---|
resolution | Optional (may be omitted) | Resolution for gemini_omni_flash_1_1: 720p, 1080p, 4k (default 720p). |
aspect_ratio | Optional (may be omitted) | Aspect ratio for gemini_omni_flash_1_1: 16:9, 9:16 (default 16:9). |
upload_file[] | Optional (may be omitted) | Reference images for the video. |
session_sn | Optional (may be omitted) | Send back the value from the previous call to revise the previous video. |
Video generation usually takes a few minutes. The stream keeps sending progress messages; keep the connection open until the final event (an interrupted call is not charged).
| Module code | Name | Note |
|---|---|---|
gemini_omni_flash_1_1 | Gemini Omni Flash 1.1 Video Generation | Video output: one MP4 video with audio; the resolution (720P by default, or 1080P / 4K upscaled) and the aspect ratio (16:9 or 9:16) follow the control panel selection; the length is decided by the model (about 3 to 10 seconds). |
seedance_2_5 | seedance 2.5 Generate Video | Video output: one MP4 video of 4 to 30 seconds (15 by default) at 720P or 1080P, with the length, resolution and aspect ratio following the panel selection (with a reference video the model decides the aspect ratio and length automatically, up to 30 seconds). |
seedance_2_0 | seedance 2.0 Generate Video | Video output: one 15-second 720P MP4 video; the aspect ratio follows the panel selection. |
Call a GPTs custom assistant you created, or a public one on this site, through the site-native chat endpoint: send module=gpts and pass the assistant id in param2. The id is the number at the end of its chat page URL (https://www.myai168.com/en/ai/gpts/gpts?sn=YOUR_GPT_SN).
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gpts" \ --data-urlencode "param2=YOUR_GPT_SN" \ --data-urlencode "input=Hello, please introduce yourself."
Continue the same conversation — replace YOUR_SESSION_SN with the session_sn value emitted in the previous reply stream:
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=gpts" \ --data-urlencode "param2=YOUR_GPT_SN" \ --data-urlencode "session_sn=YOUR_SESSION_SN" \ --data-urlencode "input=Please continue."
The assistant role instructions and bound knowledge bases are applied automatically — no need to repeat them in input. To continue the same conversation, send back the session_sn value emitted in the stream. Billing follows this site default model; a private assistant can only be called with its creator API key.
AI Agent plans a task as several steps and works through them round by round with tools (web search, reading web pages and documents, writing documents, producing charts and files) until the task is done. Send module=agent and describe the task in input. Each new conversation creates a notebook of its own; uploaded files and output files are stored in that notebook.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=agent" \ --data-urlencode "input=Hello, please introduce yourself."
On the first call, omit session_sn. The stream sends a data: {"session_sn": N} event as soon as the task starts; save the value and send it back on every follow-up call of the same conversation (follow-up calls do not send a new number). AI Agent then remembers the earlier rounds and keeps working in the same notebook, so files uploaded or produced earlier are still there and can be revised.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=agent" \ --data-urlencode "input=Research the electric scooter market and write a short report as a Word document."
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "module=agent" \ --data-urlencode "session_sn=YOUR_SESSION_SN" \ --data-urlencode "input=Change the conclusion of the report into a bulleted list."
Replace YOUR_SESSION_SN with the value returned by the first call.
When a task needs many steps, AI Agent may stop and ask whether to continue; reply “Continue” with the same session_sn and it carries on from where it stopped. To start an unrelated task, omit session_sn and a new notebook is created.
curl -N https://www.myai168.com/en/ai/chat/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "module=agent" \ -F "input=Read this document and list five key points." \ -F "upload_file[]=@report.pdf"
Uploaded files (upload_file[], multiple files allowed) are saved in the notebook of the conversation for AI Agent to read and edit.
| Parameter | Required | Description |
|---|---|---|
module | Required | Fixed value agent. |
input | Required | The task to complete, or a follow-up request in a continued conversation. |
session_sn | Optional (may be omitted) | Conversation number for continuing the same conversation (see above). |
chat_model | Optional (may be omitted) | Model that runs the task; values are listed below. When omitted or set to default, the default model of this site is used. |
upload_file[] | Optional (may be omitted) | Files for AI Agent to work on (multipart/form-data, multiple files allowed). |
notebook_sn | Optional (may be omitted) | Run in one of your own notebooks and use its sources, notes and files; the number is the value after notebook?sn= in the notebook page URL. It must be your own notebook, otherwise the call stops with a permission message and is not charged. When omitted, a new conversation creates a new notebook and a continued conversation keeps using the notebook it used last. |
chat_log_ts | Optional (may be omitted) | Used with notebook_sn to choose which conversation thread of that notebook to continue; the data: {"chat_log_ts": "..."} event in the stream gives the thread used by the call. Ordinary continued conversations only need session_sn. |
chat_model (25)| Value | Name |
|---|---|
default | Site Default |
gemini_4_argon | Gemini 4 Argon |
gemini_3_8_flash | Gemini 3.8 Flash |
gemini_3_6_flash | Gemini 3.6 Flash |
gemini_3_5_flash_lite | Gemini 3.5 Flash Lite |
gemini_3_1_pro | Gemini 3.1 Pro |
gemini_3_1_flash_lite | Gemini 3.1 Flash Lite |
claude_fable_5_1 | Claude Fable 5.1 |
claude_fable_5 | Claude Fable 5 |
claude_opus_5_5 | Claude Opus 5.5 |
claude_opus_5 | Claude Opus 5 |
claude_opus_4_8 | Claude Opus 4.8 |
claude_sonnet_5_5 | Claude Sonnet 5.5 |
claude_sonnet_5 | Claude Sonnet 5 |
claude_haiku_5_5 | Claude Haiku 5.5 |
claude_haiku_4_5 | Claude Haiku 4.5 |
gpt_6_1_sol | GPT-6.1 Sol |
gpt_6_sol | GPT-6 Sol |
gpt_6_luna | GPT-6 Luna |
gpt_5_6_sol | GPT-5.6 Sol |
gpt_5_6_terra | GPT-5.6 Terra |
gpt_5_6_luna | GPT-5.6 Luna |
chatgpt_5_5 | ChatGPT 5.5 |
chatgpt_5_4_mini | ChatGPT 5.4 mini |
chatgpt_5_4_nano | ChatGPT 5.4 nano |
The reply of AI Agent arrives as html events that also carry an md key with the same content in Markdown; join the md values in order to get the full reply. html events without an md key show the progress of each round (steps and tool actions) and the credit summary at the end, and can be skipped. System messages, such as insufficient credits or the question whether to continue, arrive as text chunks in choices[0].delta.content.
Download links of output files appear in the reply, in the form https://www.myai168.com/en/api/file/download_nb?sn=...&fn=.... They are private files of the calling account: sign in to this site with the same account and open them in a browser, or open the notebook of the conversation on the AI Agent Notebook page.
import json
import requests
url = "https://www.myai168.com/en/ai/chat/chat"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
def ask(text, session_sn=0):
data = {"module": "agent", "input": text}
if session_sn:
data["session_sn"] = session_sn
reply = []
with requests.post(url, headers=headers, data=data, stream=True, timeout=(10, 1800)) as r:
r.raise_for_status()
r.encoding = "utf-8"
for line in r.iter_lines(decode_unicode=True):
if not line or not line.startswith("data: "):
continue
payload = json.loads(line[6:])
if "session_sn" in payload:
session_sn = payload["session_sn"]
elif "md" in payload:
reply.append(payload["md"])
elif payload.get("choices"):
choice = payload["choices"][0]
content = (choice.get("delta") or {}).get("content")
if content:
reply.append(content)
if choice.get("finish_reason") == "stop":
break
return "".join(reply), session_sn
answer, session_sn = ask("Research the electric scooter market and write a short report as a Word document.")
print(answer)
print("session_sn:", session_sn)
answer, session_sn = ask("Change the conclusion of the report into a bulleted list.", session_sn)
print(answer)
Requires pip install requests. ask() returns the reply and the conversation number; the second call sends the number back to continue the same conversation.
finish_reason is stop, so set a long read timeout on the client. If the connection drops, the task stops and the rounds already completed are still charged by usage.session_sn only works for the account that started the conversation, so use an API key of the same account. AI Agent conversations are not listed on the history page; keep session_sn in your program.The response is an SSE stream (Content-Type: text/event-stream, UTF-8 encoded); each event is one data: {JSON} line:
| Event | Description |
|---|---|
{"choices": [{"delta": {"content": "..."}}]} | A text chunk (OpenAI-compatible chat.completion.chunk); concatenate the chunks in order to get the full reply. |
{"html": "..."} | An HTML fragment: previews and download links of images, videos and audio, notices, and the usage summary at the end of the reply. |
{"session_sn": N} | Conversation id (only from modules that support it); send it back on the next call to continue. |
{"user_request_html": "..."} | An echo of the uploaded files (HTML); programs can ignore it. |
"finish_reason": "stop" | End of the stream (delta.content is null in this event). |
Skip any key not listed above — more event kinds may be added later.
A successful call sends one html event before the stream ends, wrapped in <span class="billing-summary">, stating the credits used by the call, the elapsed time and the remaining credits. The wording follows the site language and suits showing to users as is; when a program needs numbers, query the balance with GET https://www.myai168.com/en/api/user/get_credits.
Images, videos, audio and other outputs appear as download URLs of this site in the href / src attributes of the html fragments (URLs look like https://www.myai168.com/en/api/file/download_photo?id=... or https://www.myai168.com/en/api/file/download?id=...). These files are private to the calling account: sign in to this site with the same account and open the URL in a browser to download them.
The example reads the stream, assembles the full text reply and collects the conversation id, the output file URLs and the usage summary. If the stream ends with no reply text and no output file, the notices received are treated as the failure reason (install the package first: pip install requests):
import json
import re
import requests
url = "https://www.myai168.com/en/ai/chat/chat"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {"module": "default", "input": "Hello, please introduce yourself."}
text_parts = []
file_urls = []
notices = []
billing = ""
session_sn = 0
with requests.post(url, headers=headers, data=data, stream=True, timeout=(10, 900)) as r:
r.raise_for_status()
r.encoding = "utf-8"
for line in r.iter_lines(decode_unicode=True):
if not line or not line.startswith("data: "):
continue
payload = json.loads(line[6:])
if "session_sn" in payload:
session_sn = payload["session_sn"]
elif "html" in payload:
fragment = payload["html"]
for u in re.findall(r'(?:href|src)="([^"]*/api/file/[^"]+)"', fragment):
if u not in file_urls:
file_urls.append(u)
plain = " ".join(re.sub(r"<[^>]+>", " ", fragment).split())
if 'class="billing-summary"' in fragment:
billing = plain
elif plain:
notices.append(plain)
elif payload.get("choices"):
choice = payload["choices"][0]
content = (choice.get("delta") or {}).get("content")
if content:
text_parts.append(content)
if choice.get("finish_reason") == "stop":
break
answer = "".join(text_parts)
if not answer and not file_urls:
raise RuntimeError("request failed: " + " / ".join(notices))
print(answer)
print("session_sn:", session_sn)
print("files:", file_urls)
print("billing:", billing)
Do not omit r.encoding = "utf-8": the response header does not state the encoding, and without this line requests turns non-ASCII text into garbage. timeout=(10, 900) means 10 seconds to connect and at most 900 seconds between two chunks.
To upload files, pass them in the files argument with the field name upload_file[]:
files = [("upload_file[]", open("photo.jpg", "rb"))]
data = {"module": "default", "input": "What is in this picture?"}
r = requests.post(url, headers=headers, data=data, files=files, stream=True, timeout=(10, 900))
This uses the fetch built into Node.js 18 and later, so no package is needed. Save it as chat.mjs and run node chat.mjs:
const url = "https://www.myai168.com/en/ai/chat/chat";
const body = new URLSearchParams({ module: "default", input: "Hello, please introduce yourself." });
const res = await fetch(url, {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body,
});
if (!res.ok) throw new Error("HTTP " + res.status);
let answer = "";
let sessionSn = 0;
const fileUrls = new Set();
const decoder = new TextDecoder();
let buffer = "";
for await (const chunk of res.body) {
buffer += decoder.decode(chunk, { stream: true });
const lines = buffer.split("\n");
buffer = lines.pop();
for (const line of lines) {
if (!line.startsWith("data: ")) continue;
const payload = JSON.parse(line.slice(6));
if (payload.session_sn !== undefined) {
sessionSn = payload.session_sn;
} else if (payload.html !== undefined) {
for (const m of payload.html.matchAll(/(?:href|src)="([^"]*\/api\/file\/[^"]+)"/g)) {
fileUrls.add(m[1]);
}
} else if (payload.choices) {
answer += payload.choices[0].delta?.content ?? "";
}
}
}
console.log(answer);
console.log("session_sn:", sessionSn);
console.log("files:", [...fileUrls]);
To upload files, use FormData (do not set Content-Type yourself — fetch adds the boundary automatically); read the response the same way as above:
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("module", "default");
form.append("input", "What is in this picture?");
form.append("upload_file[]", new Blob([await readFile("photo.jpg")]), "photo.jpg");
const res = await fetch("https://www.myai168.com/en/ai/chat/chat", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body: form,
});
finish_reason is stop. A call interrupted midway is not charged and can simply be sent again.session_sn for each conversation, and omit it when starting a new topic.