POST /en/api/openai/v1/responsesResponses API (new chat interface with streaming support).
curl https://www.myai168.com/en/api/openai/v1/responses \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","input":"Hello"}'
import requests
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/responses",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
json={"model": "gpt-5.5", "input": "Hello"},
)
print(r.json())
POST /en/api/openai/v1/chat/completionsChat Completions API (legacy chat interface, OpenAI SDK compatible).
curl https://www.myai168.com/en/api/openai/v1/chat/completions \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","messages":[{"role":"user","content":"Hello"}]}'
import requests
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/chat/completions",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
json={"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello"}]},
)
print(r.json())
POST /en/api/openai/v1/audio/speechText-to-speech (TTS). Returns audio binary.
curl https://www.myai168.com/en/api/openai/v1/audio/speech \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","input":"Hello","voice":"nova"}' \
--output speech.mp3
import requests
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/audio/speech",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
json={"model": "tts-1", "input": "Hello", "voice": "nova"},
)
with open("speech.mp3", "wb") as f:
f.write(r.content)
POST /en/api/openai/v1/audio/transcriptionsSpeech-to-text (STT, multipart upload).
curl https://www.myai168.com/en/api/openai/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-F file=@audio.mp3 \
-F model=gpt-4o-transcribe
import requests
with open("audio.mp3", "rb") as f:
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/audio/transcriptions",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
files={"file": f},
data={"model": "gpt-4o-transcribe"},
)
print(r.json())
POST /en/api/openai/v1/audio/translationsTranslate speech to English text (STT + translate).
curl https://www.myai168.com/en/api/openai/v1/audio/translations \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-F file=@audio.mp3 \
-F model=gpt-4o-transcribe
import requests
with open("audio.mp3", "rb") as f:
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/audio/translations",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
files={"file": f},
data={"model": "gpt-4o-transcribe"},
)
print(r.json())
POST /en/api/openai/v1/images/generationsText-to-image (gpt-image-2).
curl https://www.myai168.com/en/api/openai/v1/images/generations \
-H "Authorization: Bearer YOUR_DEV_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A cute cat","size":"1024x1024"}'
import requests
r = requests.post(
"https://www.myai168.com/en/api/openai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_DEV_KEY"},
json={"model": "gpt-image-2", "prompt": "A cute cat", "size": "1024x1024"},
)
print(r.json())