API для разработчиков
Подключите AI-генерацию видео и изображений к вашему приложению через Vixel API. Все модели A2E доступны через единый интерфейс.
Аутентификация
Все запросы требуют API-ключ. Получите ключ в личном кабинете в разделе «API ключи». Передавайте ключ в заголовке:
# Два варианта: Authorization: Bearer vx_your_api_key_here # или X-API-Key: vx_your_api_key_here
Эндпоинты
GET
/api/v1/modelsСписок доступных моделей с ценами.
curl https://vixel.tech/api/v1/models \
-H "Authorization: Bearer vx_YOUR_KEY"
# Ответ:
{
"models": [
{"slug": "wan-2-6", "cost_coins": 75, "cost_type": "fixed", ...},
{"slug": "seedream-5-0", "cost_coins": 20, "cost_type": "per_image", ...},
...
]
}GET
/api/v1/balanceБаланс кошелька.
curl https://vixel.tech/api/v1/balance \
-H "Authorization: Bearer vx_YOUR_KEY"
# Ответ: {"balance_kopecks": 50000, "balance_rub": 500.0}POST
/api/v1/generate/videoГенерация видео из изображения.
curl https://vixel.tech/api/v1/generate/video \
-H "Authorization: Bearer vx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "wan-2-6",
"payload": {
"image_url": "https://example.com/photo.jpg",
"prompt": "Кинематографичное движение",
"video_time": 5,
"resolution": "720p"
}
}'
# Ответ: {"job_id": "...", "a2e_job_id": "...", "status": "pending", "cost_rub": 75}POST
/api/v1/generate/imageГенерация изображения по текстовому описанию.
curl https://vixel.tech/api/v1/generate/image \
-H "Authorization: Bearer vx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "seedream-5-0",
"payload": {
"prompt": "Закат в горах, масляная живопись",
"num_images": 2
}
}'POST
/api/v1/generate/voiceСинтез речи из текста.
curl https://vixel.tech/api/v1/generate/voice \
-H "Authorization: Bearer vx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Привет, это AI-голос!",
"provider": "elevenlabs"
}'GET
/api/v1/task/{task_id}Проверка статуса задачи.
curl https://vixel.tech/api/v1/task/TASK_ID \
-H "Authorization: Bearer vx_YOUR_KEY"
# Ответ: {"id": "...", "service": "wan-2-6", "status": "completed", "result_url": "..."}Модели и цены
| Slug | Тип стоимости | Базовая цена (₽) |
|---|---|---|
| image-to-video | fixed | 30 |
| wan-2-6 | fixed | 75 |
| wan-2-7 | fixed | 90 |
| wan-2-6-flash | fixed | 40 |
| kling-2-6 | fixed | 80 |
| kling-3-0 | fixed | 100 |
| kling-o1 | fixed | 110 |
| veo-3-1 | fixed | 120 |
| sora-2-pro | fixed | 120 |
| seedance | fixed | 75 |
| seedance-2 | fixed | 95 |
| hailuo | fixed | 85 |
| happyhorse-1-0 | fixed | 65 |
| grok-imagine | fixed | 100 |
| text-to-image | per_image | 10 |
| seedream-4-5 | per_image | 15 |
| seedream-5-0 | per_image | 20 |
| nano-banana-2 | per_image | 12 |
| z-image | per_image | 15 |
| flux-2-pro | per_image | 18 |
| gpt-image | per_image | 20 |
| gpt-image-2-0 | per_image | 25 |
| image-editor | fixed | 15 |
| talking-photo | per_second | 6 |
| talking-video | per_second | 6 |
| face-swap | per_second | 1 |
| head-swap | fixed | 10 |
| voice-clone | fixed | 100 |
| text-to-speech | per_second | 1 |
| actor-animation | per_second | 6 |
| actor-swap | per_second | 6 |
| virtual-tryon | fixed | 10 |
| cloth-swap | fixed | 10 |
| product-avatar | fixed | 10 |
| subtitle-remover | per_second | 1 |
| video-to-video | fixed | 60 |
| video-to-audio | fixed | 10 |
| video-downloader | fixed | 5 |
| upscale | fixed | 10 |
| ai-dubbing | fixed | 30 |
Примеры кода
Python
import requests
API_KEY = "vx_your_key"
BASE = "https://vixel.tech/api/v1"
# Список моделей
r = requests.get(f"{BASE}/models", headers={"Authorization": f"Bearer {API_KEY}"})
print(r.json())
# Генерация видео
r = requests.post(f"{BASE}/generate/video", json={
"service": "wan-2-6",
"payload": {
"image_url": "https://example.com/photo.jpg",
"prompt": "Плавное движение камеры",
"video_time": 5,
"resolution": "720p"
}
}, headers={"Authorization": f"Bearer {API_KEY}"})
job = r.json()
print(f"Job ID: {job['job_id']}, Status: {job['status']}")JavaScript / Node.js
const API_KEY = "vx_your_key";
const BASE = "https://vixel.tech/api/v1";
// Список моделей
const models = await fetch(BASE + "/models", {
headers: { Authorization: "Bearer " + API_KEY }
}).then(r => r.json());
// Генерация изображения
const job = await fetch(BASE + "/generate/image", {
method: "POST",
headers: {
"Authorization": "Bearer " + API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
service: "seedream-5-0",
payload: {
prompt: "Космический пейзаж",
num_images: 2
}
})
}).then(r => r.json());API ключи доступны в личном кабинете