Skip to content
Tài liệu API

API Đa phương thức & Truy xuất ​

Tài liệu điểm cuối đầy đủ cho tạo/chỉnh sửa ảnh, tổng hợp/chuyển đổi âm thanh, RAG embeddings/reranking và tạo video bất đồng bộ.

Tạo & Chỉnh sửa ảnh ​

POSThttps://api.vanix.io/v1/images/generations
POSThttps://api.vanix.io/v1/images/edits
Thử nghiệm trực tiếpPOST /v1/images/generations
Tham sốKiểu dữ liệuMô tả
modelstringVí dụ: gpt-image-1, flux-pro, imagen-3
promptstringMô tả trực quan chi tiết
sizestring1024x1024, 1536x1024, 1024x1536
qualitystringlow, medium, high hoặc auto
nintegerSố lượng ảnh đầu ra (mặc định 1)

Embeddings & Rerank ​

POSThttps://api.vanix.io/v1/embeddings
POSThttps://api.vanix.io/v1/rerank
Thử nghiệm trực tiếpPOST /v1/embeddings
bash
curl https://api.vanix.io/v1/rerank \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $VANIX_API_KEY" \
  -d '{
    "model": "rerank-v3.5",
    "query": "Vanix AI authentication header for Anthropic",
    "top_n": 2,
    "documents": [
      "Anthropic Messages uses x-api-key and anthropic-version headers.",
      "Embeddings return float arrays from POST /v1/embeddings."
    ]
  }'

Âm thanh (TTS, STT & Dịch thuật) ​

POSThttps://api.vanix.io/v1/audio/speech
POSThttps://api.vanix.io/v1/audio/transcriptions
POSThttps://api.vanix.io/v1/audio/translations
  • TTS nhận JSON (model, voice, input, response_format) và truyền phát byte âm thanh thô (mp3, opus, aac, flac, wav).
  • STT / Dịch thuật nhận multipart/form-data với file, model, tùy chọn language và response_format (json, text, srt, vtt, verbose_json).

Tác vụ Video bất đồng bộ ​

POSThttps://api.vanix.io/v1/videos
GEThttps://api.vanix.io/v1/videos/{task_id}
GEThttps://api.vanix.io/v1/videos/{task_id}/content

Gửi tác vụ tạo video, gọi định kỳ GET /v1/videos/{task_id} cho đến khi status === "completed", sau đó tải tệp kết quả qua /content. Xem Hướng dẫn Video & Tác vụ bất đồng bộ để biết các mẫu polling chi tiết.

Vanix AI Cổng API Hợp Nhất · https://api.vanix.io