Skip to content
Last updated

Welcome to the comprehensive Freddy platform documentation. Here you'll find guides, tutorials, best practices, and everything you need to get started with the Freddy AI platform.

📚 Documentation

Comprehensive guides, tutorials, and best practices

🚀 Quick Start

1️⃣ Getting Started

New to Freddy? Start here for a complete overview and setup guide.

Read Guide →

2️⃣ Authentication

Learn how to authenticate and secure your API requests.

Learn More →

3️⃣ Code Examples

Practical examples and code snippets in multiple languages.

View Examples →

📖 Documentation Sections

🔰 Fundamentals

🔌 API Documentation

🎯 Advanced Topics

🛠️ Integration Guides

🎓 Tutorials

📚 Step-by-Step Tutorials

Beginner Tutorials:

Intermediate Tutorials:

Advanced Tutorials:

🔍 Search & Navigation

🔍 Find What You Need

Use your browser's search (Ctrl+F / Cmd+F) to quickly find specific topics, or browse through the organized sections above.

Popular Searches:

  • Authentication methods
  • API rate limits
  • Error codes
  • Code examples
  • Integration guides

🆘 Need Help?

📖 Documentation

Browse our comprehensive guides

Browse Docs

🔌 API Reference

Interactive API documentation

View APIs

🌐 Hub

Access the main application

Open Hub

📧 Support

Contact our technical team

Get Support

📈 What's New

  • 196+ API Endpoints documented with interactive examples
  • Auto-sync documentation with backend changes
  • Enhanced tutorials with step-by-step guides
  • Code examples in multiple programming languages
  • Postman collections for easy API testing

Documentation automatically updated with platform changes


📋 Detailed Sections

Platform Overview {#platform-overview}

Freddy is a comprehensive AI-powered backend system that provides:

  • 🤖 AI Intelligence - Multiple AI model support (OpenAI, Anthropic, Google)
  • 👥 User Management - Complete authentication and user lifecycle
  • 🏢 Organization Tools - Multi-tenant architecture with role-based access
  • 📊 Analytics & Monitoring - Real-time usage tracking and insights
  • 💰 Billing & Finance - Automated usage-based billing system

Authentication {#authentication}

The Freddy API uses API keys for authentication. All requests must include your API key in the header:

curl -H "api-key: ak_your_api_key_here" https://api.freddy.ai/v2/endpoint

Getting Your API Key:

  1. Log in to the Freddy Hub
  2. Navigate to Settings → API Keys
  3. Click "Create New API Key"
  4. Copy and securely store your key

Error Handling {#error-handling}

The API returns standard HTTP status codes and structured error responses:

{
  "detail": "Error message",
  "status_code": 400,
  "error_type": "ValidationError"
}

Common Status Codes:

  • 200 - Success
  • 400 - Bad Request (validation error)
  • 401 - Unauthorized (invalid API key)
  • 429 - Too Many Requests (rate limited)
  • 500 - Internal Server Error

Rate Limiting {#rate-limiting}

API requests are rate limited based on your service tier:

  • Standard: 100 requests/minute
  • Premium: 1000 requests/minute
  • Enterprise: Custom limits

Rate limit headers are included in every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1234567890

Best Practices {#best-practices}

🔐 Security:

  • Never expose API keys in client-side code
  • Use environment variables for API keys
  • Implement proper error handling
  • Validate all user inputs

⚡ Performance:

  • Cache responses when appropriate
  • Use pagination for large datasets
  • Implement exponential backoff for retries
  • Monitor your usage and rate limits

🛠️ Development:

  • Use the interactive API docs for testing
  • Implement proper logging and monitoring
  • Follow RESTful conventions
  • Keep your API keys secure

Tutorial Sections

Building Your First Chat Application {#first-chat-app}

Create a simple chat interface using the Freddy API:

  1. Set up authentication with your API key
  2. Create a chat session using the /v2/threads endpoint
  3. Send messages using the /v2/messages endpoint
  4. Get AI responses using the /v2/model/response endpoint

User Authentication Setup {#auth-setup}

Implement secure user authentication:

  1. User Registration - /v2/auth/register
  2. Email Verification - /v2/auth/verify-email
  3. User Login - /v2/auth/login
  4. Session Management - Handle JWT tokens securely

Making Your First API Call {#first-api-call}

Get started with a simple API request:

curl -X GET "https://api.freddy.ai/v2/models" \
  -H "api-key: ak_your_api_key_here"

This returns a list of available AI models you can use.

Integration Guides

Web Integration {#web-integration}

Integrate Freddy into web applications:

  • Use HTTPS for all API calls
  • Implement proper CORS handling
  • Store API keys securely on the server
  • Use WebSockets for real-time features

Mobile Integration {#mobile-integration}

Best practices for mobile apps:

  • Store API keys in secure storage
  • Implement offline functionality
  • Handle network connectivity issues
  • Optimize for mobile data usage

Webhook Integration {#webhooks}

Set up real-time notifications:

  • Configure webhook endpoints
  • Verify webhook signatures
  • Handle webhook retries
  • Process events asynchronously

Custom Integration {#custom-integration}

Build custom solutions:

  • Generate client SDKs
  • Implement custom authentication
  • Build monitoring and alerting

Performance & Scaling

Performance Tips {#performance}

Optimize your API usage:

  • Use appropriate pagination
  • Implement caching strategies
  • Batch requests when possible
  • Monitor response times

Scaling Your Application {#scaling}

Handle high-volume usage:

  • Implement connection pooling
  • Use load balancing
  • Monitor rate limits
  • Plan for traffic spikes

Security Guidelines {#security}

Keep your integration secure:

  • Use HTTPS everywhere
  • Validate all inputs
  • Implement proper authentication
  • Monitor for suspicious activity

This documentation is automatically updated with platform changes