Cách sử dụng Hermes 4 405B API
-
Lấy API key: Tạo key trong bảng điều khiển Muapi.
-
Gửi prompt: POST prompt (plus optional system_prompt and max_tokens, up to 32768) to /api/v1/hermes-4-405b.
curl -X POST https://api.muapi.ai/api/v1/hermes-4-405b \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers."}'
- 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/hermes-4-405b/stream.
curl -X POST https://api.muapi.ai/api/v1/hermes-4-405b/stream \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers."}'
- Đọc kết quả: Văn bản được tạo trả về trong
outputs. Chi phí tính theo số token thực tế.