Quick Start
Get up and running with Rustellar in minutes.
Prerequisites
Before you begin, make sure you have:
- An API key (sign up at platform.rustellar.com)
- Basic knowledge of REST APIs
- Your preferred programming language environment
Installation
Using cURL
curl -X POST https://api.rustellar.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "helix-v1",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}'
Using Python
import requests
# APIキーを設定
api_key = "YOUR_API_KEY"
url = "https://api.rustellar.com/v1/chat/completions"
# リクエストヘッダー
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
# リクエストボディ
data = {
"model": "helix-v1",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}
# APIリクエストを送信
response = requests.post(url, json=data, headers=headers)
print(response.json())
Using JavaScript
// Node.jsでの使用例
const fetch = require('node-fetch');
const apiKey = 'YOUR_API_KEY';
const url = 'https://api.rustellar.com/v1/chat/completions';
// APIリクエストを送信
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({
model: 'helix-v1',
messages: [
{
role: 'user',
content: 'Hello, how are you?'
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Next Steps
- Learn about our available models
- Explore input formats
- Check rate limits