API Documentation

Enterprise AWS Chat + Image & Video Generation. 100% OpenAI SDK compatible.

🔌 Connection

Base URL
https://vertex-key.com/api/v1
API Key
vai-xxxxxxxxxx(get from Dashboard → Keys)

🏢 Chat Models — AWS Enterprise

Pricing per 1M tokens (Cr$)

Model IDNameInput / Output
aws/claude-opus-4-7Claude Opus 4.75.00 / 25.00
aws/claude-opus-4-6Claude Opus 4.65.00 / 25.00
aws/claude-opus-4-5Claude Opus 4.55.00 / 25.00
aws/claude-sonnet-4-6Claude Sonnet 4.63.00 / 15.00
aws/claude-sonnet-4-5Claude Sonnet 4.53.00 / 15.00
aws/claude-sonnet-4-0Claude Sonnet 4.03.00 / 15.00
aws/claude-haiku-4-5Claude Haiku 4.51.00 / 5.00
aws/minimax-m2.5MiniMax M2.50.50 / 2.00
aws/minimax-m2.1MiniMax M2.10.30 / 1.50
aws/glm-5GLM-51.00 / 5.00
aws/qwen3-codexQwen3 Codex Next0.10 / 0.50
Cache pricing: read 0.53× input, write 1.25× input. Context: up to 1M tokens.

🎨 Image & Video — Enterprise

Image Generation (fixed cost per request)

Model IDResolutionPrice/req
enterprise/image-21024×10240.16 Cr$
enterprise/gemini-3.1-flash-image-preview-1k1024×10240.16 Cr$
enterprise/gemini-3.1-flash-image-preview-2k2048×20480.18 Cr$
enterprise/gemini-3.1-flash-image-preview-4k4096×40960.20 Cr$
enterprise/gemini-3-pro-image-preview-1k1024×10240.32 Cr$
enterprise/gemini-3-pro-image-preview-2k2048×20480.36 Cr$
enterprise/gemini-3-pro-image-preview-4k4096×40960.40 Cr$
⚠️ Resolution cố định theo model — không thể thay đổi size trong request. Truyền size khác sẽ bị reject.

Video Generation (fixed cost per request)

Model IDNamePrice/req
enterprise/seedance-1-5-proSeedance 1.5 Pro0.60 Cr$
Video generation is async — POST to create, GET to poll status.

⚡ Quick Start

Chat Completion

bash
curl https://vertex-key.com/v1/chat/completions \
  -H "Authorization: Bearer vai-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aws/claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

Image Generation

bash
curl https://vertex-key.com/v1/images/generations \
  -H "Authorization: Bearer vai-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "enterprise/gemini-3.1-flash-image-preview-2k",
    "prompt": "A futuristic city at sunset"
  }'
Response: {"data": [{"url": "https://..."}]}. Size cố định theo model, không cần truyền.

Image Editing

bash
curl https://vertex-key.com/v1/images/edits \
  -H "Authorization: Bearer vai-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "enterprise/image-2",
    "prompt": "Add sunglasses to the person",
    "image": "<base64_or_url>"
  }'

Video Generation (Async)

bash
# Step 1: Create video job
curl https://vertex-key.com/v1/videos \
  -H "Authorization: Bearer vai-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "enterprise/seedance-1-5-pro",
    "prompt": "A cat walking on the beach at sunset"
  }'
# Response: {"id": "task_xxx", "status": "queued"}

# Step 2: Poll status until complete
curl https://vertex-key.com/v1/videos/task_xxx \
  -H "Authorization: Bearer vai-your-api-key"
# Response: {"status": "completed", "video_url": "https://..."}
Video generation takes ~60-120s. Poll every 10-15s until status is "completed".

🐍 Python SDK

python
from openai import OpenAI

client = OpenAI(
    api_key="vai-your-api-key",
    base_url="https://vertex-key.com/v1",
)

# Chat
response = client.chat.completions.create(
    model="aws/claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

# Image Generation
image = client.images.generate(
    model="enterprise/gemini-3.1-flash-image-preview-1k",
    prompt="A red panda in a bamboo forest",
)
print(image.data[0].url)

🟢 Node.js SDK

javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "vai-your-api-key",
  baseURL: "https://vertex-key.com/v1",
});

// Chat
const chat = await client.chat.completions.create({
  model: "aws/claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(chat.choices[0].message.content);

// Image Generation
const image = await client.images.generate({
  model: "enterprise/gemini-3.1-flash-image-preview-2k",
  prompt: "A cyberpunk cityscape",
});
console.log(image.data[0].url);

📍 API Endpoints

Chat
POST /v1/chat/completions — OpenAI format
POST /v1/messages — Anthropic format
GET /v1/models — List available models
Image
POST /v1/images/generations — Generate image
POST /v1/images/edits — Edit image
Video
POST /v1/videos — Create video generation job
GET /v1/videos/{video_id} — Query video status

⚠️ Notes

AWS Chat: Full feature — tool calling, vision, streaming, 1M context. Best for production & agents.
Image: Fixed cost per request. Supports 1K/2K/4K. Response ~15-30s. Trả URL ảnh.
Video: Async — tạo job rồi poll status. Response ~60-120s. Trả URL video khi hoàn thành.
Billing: Tất cả trừ từ balance Cr$. Image/Video charge fixed cost ngay. Chat charge theo token thực tế.