Getting Started
Prerequisites
Before you begin, make sure you have:
- Created a Sybil account at sybil.com.
- Generated an API Key in your Settings > API Keys.
- Added credits to your account or subscribed to a plan (see Billing & Credits).
Step 1: Set up your API Key
To make requests to the Sybil API, you need an API key.
- Navigate to the Settings page in your dashboard.
- Select the API Keys tab.
- Click Create New Key.
The Sybil API is compatible with the OpenAI API format, making it easy to use with existing tools and libraries. Here is how to generate a text completion using curl.
Chat Completion
To chat with a model, send a POST request to the /chat/completions endpoint.
curl https://api.sybil.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SYBIL_API_KEY" \
-d '{
"model": "mistral-large",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Write a haiku about AI."
}
]
}'
Response:
{
"model": "mistral-large",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Silicon mind wakes,\nData flows like river stream,\nFuture now begins."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 17,
"total_tokens": 35
}
}
Next Steps
- Check out the full API Reference for more details on parameters.
- Learn about Text Generation for advanced usage patterns.
- Review the Billing Guide to understand costs.