多模態能力取決於選中的模型。請透過 GET /v1/models 或控制台價格頁確認當前可用的多模態模型。
圖像
OpenAI 風格圖像生成:
curl https://llmoxy.com/v1/images/generations \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A clean product icon for an LLM gateway",
"size": "1024x1024",
"response_format": "url"
}'
LLMoxy 也會轉發模型特有的圖像參數,只要所選模型支援它們。
圖像編輯路由:
POST /v1/images/edits
POST /v1/edits
音訊
文字轉語音:
curl https://llmoxy.com/v1/audio/speech \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello from LLMoxy.",
"voice": "alloy",
"response_format": "mp3"
}' \
--output speech.mp3
音訊轉錄和翻譯使用 multipart 表單上傳:
POST /v1/audio/transcriptions
POST /v1/audio/translations
視訊
OpenAI 相容視訊生成:
curl https://llmoxy.com/v1/videos \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
-F model=sora-2 \
-F prompt="cute cat dance" \
-F seconds=8
查詢狀態:
curl "https://llmoxy.com/v1/videos/$TASK_ID" \
-H "Authorization: Bearer <LLMOXY_API_KEY>"
下載內容:
curl "https://llmoxy.com/v1/videos/$TASK_ID/content" \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
--output output.mp4
LLMoxy 也支援 POST /v1/video/generations 的 JSON 視訊生成介面,以及 Kling、Jimeng 等廠商風格路由。具體支援的模型請查看控制台模型列表。
Realtime
Realtime 使用 WebSocket 端點:
wss://llmoxy.com/v1/realtime?model=gpt-4o-realtime-preview
服務端客戶端可在握手時使用標準認證頭;瀏覽器客戶端可使用 OpenAI 風格子協定金鑰格式。
