LLM
Vtrix LLM API is fully compatible with OpenAI API, supporting mainstream large language models. Simply switch the API endpoint and key for seamless migration.
Security Warning: Never use API keys directly in client-side code. Always make API calls through your backend server.
Quick Example
Send a chat request using curl:
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"}]
}'Streaming Response
Add stream: true parameter for streaming responses:
curl 'https://cloud.vtrix.ai/llm/chat/completions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "vtrix-gpt-5",
"messages": [{"role":"user","content":"hello"}],
"stream": true
}'Last updated