Cách sử dụng Qwen3.5 27B Opus-Distilled Derestricted API
-
Lấy API key: Tạo key trong bảng điều khiển Muapi.
-
Gửi prompt: POST prompt (cùng system_prompt và max_tokens tùy chọn, tối đa 32768) tới /api/v1/qwen-3-5-27b-opus-distilled-derestricted. Có thể cung cấp image_url công khai để gửi kèm hình ảnh với prompt.
curl -X POST https://api.muapi.ai/api/v1/qwen-3-5-27b-opus-distilled-derestricted \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers.", "image_url": "https://example.com/photo.jpg"}'
- Polling hoặc phát trực tuyến: Poll
GET /api/v1/predictions/{request_id}/result cho đến khi status là completed, hoặc phát trực tiếp token từ /api/v1/qwen-3-5-27b-opus-distilled-derestricted/stream.
curl -X POST https://api.muapi.ai/api/v1/qwen-3-5-27b-opus-distilled-derestricted/stream \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers.", "image_url": "https://example.com/photo.jpg"}'
- Đọc kết quả: Văn bản được tạo trả về trong
outputs. Chi phí được tính theo số token thực tế.