Skip to main content

Getting Started

Prerequisites

Before you begin, make sure you have:

  1. Created a Sybil account at sybil.com.
  2. Generated an API Key in your Settings > API Keys.
  3. 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.

  1. Navigate to the Settings page in your dashboard.
  2. Select the API Keys tab.
  3. 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