Skip to main content

Quickstart Guide

Get up and running with AstraCollab in just a few minutes. This guide will walk you through setting up your account, creating API keys, and making your first API call.

Prerequisites

  • Node.js 18+ installed
  • A code editor (VS Code recommended)
  • Basic knowledge of JavaScript/TypeScript

Step 1: Create an Account

  1. Visit astracollab.app
  2. Sign up with your email or GitHub account
  3. Create your first organization
  4. Choose a plan

Step 2: Generate API Keys

  1. Navigate to the API Keys section in your dashboard
  2. Click Create API Key
  3. Give your key a descriptive name (e.g., “Production API Key”)
  4. Copy the generated API key (you won’t be able to see it again)
Keep your API key secure and never commit it to version control. Use environment variables in production.

Step 3: Install the SDK

Choose your preferred SDK:

Next.js SDK

npm install @astracollab/nextjs

JavaScript SDK

npm install @astracollab/js

Step 4: Make Your First API Call

Using the Next.js SDK

import { FileUploaderWithUI } from '@astracollab/nextjs';

function MyComponent() {
  const config = {
    baseURL: 'https://api.astracollab.app',
    apiKey: process.env.ASTRACOLLAB_API_KEY
  };

  return (
    <FileUploaderWithUI
      config={config}
      onUploadComplete={(results) => {
        console.log('Upload completed:', results);
      }}
    />
  );
}

Using the JavaScript SDK

import { AstraCollabClient } from '@astracollab/js';

const client = new AstraCollabClient({
  apiKey: 'your-api-key-here'
});

// List files
const files = await client.listFiles();
console.log('Files:', files);

// Upload a file
const fileId = await client.uploadFile({
  file: fileObject,
  fileName: 'example.jpg'
});
console.log('File uploaded:', fileId);

Direct API Call

curl -X GET "https://api.astracollab.app/v1/files" \
  -H "Authorization: Bearer your-api-key-here"

Step 5: Set Up Environment Variables

Create a .env.local file in your project root:
ASTRACOLLAB_API_KEY=your-api-key-here
ASTRACOLLAB_BASE_URL=https://api.astracollab.app

Step 6: Test Your Integration

  1. Upload a test file using the SDK or API
  2. Verify the file appears in your dashboard
  3. Check the file details and metadata

Next Steps

Now that you’re set up, explore these resources:

Need Help?

  • Documentation: Browse our comprehensive guides
  • API Reference: Check endpoint documentation
  • Support: Email us at [email protected]

Join our community

Connect with other developers and get help from our team.