Vantico API Documentation
Build powerful AI applications with Vantico's OpenAI-compatible API. Access our Tico Free model with simple HTTP requests.
Quick Reference
| Base URL | https://vantico.xyz/api/v1 |
| Endpoint | POST /chat/completions |
| Authentication | Authorization: Bearer VANTICO-... |
| Model | Tico Free (model parameter optional) |
| SDK Compatibility | OpenAI Python & JavaScript SDKs |
| Streaming | Supported (set stream: true) |
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer VANTICO-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX
Getting Your API Key
- Sign in to your Vantico account
- Click on your profile in the sidebar
- Select "API Keys"
- Click "Create New API Key"
- Copy and save your key immediately
Getting Started
Vantico's API is compatible with the OpenAI SDK, making it easy to integrate into your existing applications.
Quick Start
curl https://vantico.xyz/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
Endpoints
Chat Completions
/chat/completions
Create a chat completion with the Tico Free model.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
messages |
array | Yes | Array of message objects with role and content |
model |
string | No | Model identifier. Use "tico-free" or any value (ignored, defaults to Tico Free) |
temperature |
number | No | Sampling temperature (0-2). Default: 0.7 |
max_tokens |
integer | No | Maximum tokens to generate. Default: 8000 |
stream |
boolean | No | Enable streaming responses. Default: false |
📝 Note on Model Parameter
The model parameter is optional and currently not used. All requests use the Tico Free model by default. You can omit this field or set it to any value (e.g., "tico-free", "gpt-3.5-turbo") for OpenAI SDK compatibility.
Message Roles
Each message object must include:
role: One of "system", "user", or "assistant"content: The message text
Example message structure:
{
"role": "user",
"content": "What is the capital of France?"
}
Example Request
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"temperature": 0.7,
"max_tokens": 1000
}
Example Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1234567890,
"model": "tico-free",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The capital of France is Paris."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 8,
"total_tokens": 33
}
}
Streaming Responses
Enable streaming by setting "stream": true in your request. The response will be sent as Server-Sent Events (SSE).
Example Streaming Request
{
"messages": [
{"role": "user", "content": "Tell me a story"}
],
"stream": true
}
Stream Response Format
data: {"id":"chatcmpl-123","choices":[{"delta":{"content":"Once"}}]}
data: {"id":"chatcmpl-123","choices":[{"delta":{"content":" upon"}}]}
data: {"id":"chatcmpl-123","choices":[{"delta":{"content":" a"}}]}
data: [DONE]
Code Examples
Python
Using the official OpenAI Python library:
from openai import OpenAI
client = OpenAI(
api_key="VANTICO-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX",
base_url="https://vantico.xyz/api/v1"
)
response = client.chat.completions.create(
model="tico-free",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum computing"}
],
temperature=0.7,
max_tokens=500
)
print(response.choices[0].message.content)
Streaming Example
stream = client.chat.completions.create(
model="tico-free",
messages=[{"role": "user", "content": "Write a poem"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
JavaScript / Node.js
Using the OpenAI JavaScript/TypeScript library:
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'VANTICO-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX',
baseURL: 'https://vantico.xyz/api/v1'
});
async function chat() {
const response = await client.chat.completions.create({
model: 'tico-free',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'What is JavaScript?' }
],
temperature: 0.7,
max_tokens: 500
});
console.log(response.choices[0].message.content);
}
chat();
Streaming Example
const stream = await client.chat.completions.create({
model: 'tico-free',
messages: [{ role: 'user', content: 'Tell me a joke' }],
stream: true
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '');
}
cURL
Direct HTTP requests using cURL:
curl https://vantico.xyz/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer VANTICO-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX" \
-d '{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello, how are you?"
}
],
"temperature": 0.7,
"max_tokens": 1000
}'
Error Handling
The API uses standard HTTP status codes to indicate success or failure.
| Status Code | Meaning |
|---|---|
200 |
Success |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid or missing API key |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error |
Error Response Format
{
"error": {
"message": "Invalid API key provided",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}
Rate Limits
API requests share the same rate limits as the main Vantico platform. Rate limits are applied per underlying Groq API key, not per Vantico API key.
Best Practices
- Implement exponential backoff for rate limit errors
- Cache responses when possible
- Use streaming for long responses
- Monitor your usage patterns
Need Help?
If you have questions or need support, please:
- Check our main platform for updates
- Review the examples above
- Ensure your API key is valid and active