Quickstart Guide

Get Started with Assisters

Start building with Assisters APIs in under 5 minutes. This guide will walk you through authentication, making your first API call, and best practices.

1

Get Your API Key

First, you'll need an API key to authenticate your requests.

  1. Sign up for an account at assisters.dev/signup
  2. Navigate to the API Keys page in your dashboard
  3. Click "Create API Key" and give it a descriptive name
  4. Copy your key (it will only be shown once)
!

Keep your API key secure

Never share your API key or commit it to version control. Use environment variables to store it securely.

2

Make Your First Request

Let's make a simple chat completion request using cURL:

cURL
curl https://api.assisters.dev/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "assisters-chat-v1",
    "messages": [
      {
        "role": "user",
        "content": "Explain quantum computing in simple terms"
      }
    ]
  }'

You'll receive a response like this:

Response
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1704067200,
  "model": "assisters-chat-v1",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Quantum computing uses quantum mechanics..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 120,
    "total_tokens": 135
  }
}
3

Use in Your Code

Integrate Assisters into your application using your preferred language:

Python

main.py
import os
from assisters import Assisters

# Initialize the client
client = Assisters(api_key=os.environ.get("ASSISTERS_API_KEY"))

# Create a chat completion
response = client.chat.completions.create(
    model="assisters-chat-v1",
    messages=[
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

# Print the response
print(response.choices[0].message.content)

Node.js

index.js
import Assisters from 'assisters';

const client = new Assisters({
  apiKey: process.env.ASSISTERS_API_KEY
});

async function main() {
  const response = await client.chat.completions.create({
    model: 'assisters-chat-v1',
    messages: [
      { role: 'user', content: 'Hello, how are you?' }
    ]
  });

  console.log(response.choices[0].message.content);
}

main();
4

Next Steps

Best Practices

Use environment variables

Store your API key in environment variables, never hardcode it in your source code.

Handle errors gracefully

Implement proper error handling and retry logic for production applications.

Monitor your usage

Check your dashboard regularly to track API usage and costs.

Start with smaller models

Use efficient models like Assisters Chat v1 for development, upgrade to Assisters Chat v2 when needed.

Ready to Build?

You're all set to start building with Assisters. Try it out in the playground or dive deeper into the API documentation.