Authentication
Create Your API Key
Before you begin, you need an API key. Go to Settings to create one.
Step 1: Click the “Create API Key” button
Step 2: Give your API Key a descriptive name
Step 3: Save and copy the generated API Key (shown only once)
Using Your API Key
Include your API key in the Authorization header of every API request:
Authorization: Bearer YOUR_API_KEY
API Key Security Best Practices
Use Environment Variables: Store your API Key in environment variables, never hardcode it in source code
Server-Side Only: Always make API calls from your backend, never directly from browsers or mobile apps
Regular Rotation: Regularly rotate your API Keys, especially if you suspect they may have been compromised
Least Privilege: Create separate API Keys for different applications for easier management and revocation
If you believe your API Key has been compromised, immediately revoke it in your Settings and create a new one.
Use LLM Models (Text Chat)
Chat with any LLM model. Here are complete code examples:
curl 'https://cloud.vtrix.ai/llm/chat/completions' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "vtrix-gpt-5",
"messages": [{"role":"user","content":"hello"}]
}'
Use AI Agents (Specialized Capabilities)
AI Agents are specialized AI assistants with tool-calling and multi-modal capabilities:
curl https://cloud.vtrix.ai/agent/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "X-Project: Vtrix" \
-d '{
"agent_id": "seagen_agent",
"model":"vtrix-gpt-4.1",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Hello, please introduce yourself."
}
]
}
]
}'
Visit Agent Studio to browse available Agents, or see Agent API docs for detailed usage.
Use Multi-Modal Models (Image Generation)
Generate images using Google Gemini 3 Pro Image. This example shows how to call multi-modal models:
curl --location 'https://cloud.vtrix.ai/model/v1/generation' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "google_gemini3_pro_image",
"input": [
{
"params": {
"prompt": "example_prompt",
"image_urls": [
"https://example.com/image.jpg"
],
"aspect_ratio": "1:1",
"resolution": "1K"
}
}
]
}'