📘 Documentation

Quickstart Guide

Get started with CoderSwap AI in minutes. Upload documents and search with AI-powered hybrid search.

Prerequisites

  1. Create a CoderSwap AI account (Free: 100 MB, 10K calls/month)
  2. Create a project from the dashboard
  3. Generate API keys (Settings → API Keys)

API Keys

🔑

Single API Key Model

CoderSwap AI uses a simplified single key model for easy integration. Each API key provides search access to your projects.

  • • Format: cs_dev_xxxxxxxxxxxxx
  • • Access: Search API for all your projects
  • • Rate Limit: Tier-based (60-1200 req/min)
  • • Security: Keep keys secure, never expose in public code

1Upload Documents

Upload documents through the web dashboard. Navigate to your project and use the document upload interface.

📤Upload via Dashboard

  1. 1. Go to Dashboard
  2. 2. Select your project
  3. 3. Click "Upload Documents"
  4. 4. Choose PDF, DOCX, DOC, Markdown, TXT, YAML, JSON, or XML files (Free: 100 MB, Pro: 1 GB, Business: 5 GB)
  5. 5. Configure AI search settings and deploy

Note: Programmatic upload API is coming soon. For now, use the dashboard for file uploads.

2Search Documents

Use the /v1/search endpoint to search your documents with AI-powered hybrid search.

curl -X POST https://api.coderswap.ai/v1/search \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "your search query",
    "project_id": "YOUR_PROJECT_ID"
  }'

Response:

{
  "success": true,
  "results": [
    {
      "id": "abc123",
      "snippet": "How to reset your password...",
      "score": 0.92,
      "metadata": {"page": 1}
    }
  ],
  "total_results": 1
}

Authentication

All API requests require an API key passed in the X-API-Key header:

X-API-Key: YOUR_API_KEY

🔒 Security Best Practices

  • • Never expose API keys in client-side code or public repositories
  • • Store keys securely using environment variables or secret managers
  • • Use server-side API calls when possible to protect your keys
  • • Revoke and rotate keys if you suspect they've been compromised

Rate Limits & Quotas

Free

  • • 60 requests/min
  • • 10,000 calls/month
  • • 100 MB storage
  • • 1 project

Pro ($19/mo)

  • • 600 requests/min
  • • 100,000 calls/month
  • • 1 GB storage
  • • 5 projects

Business ($49/mo)

  • • 1,200 requests/min
  • • 500,000 calls/month
  • • 5 GB storage
  • • Unlimited projects

Next Steps

Need help?

Check out our documentation or reach out to our support team.