> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sundaypyjamas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SundayPyjamas AI Suite API

> Powerful AI capabilities for your applications with our comprehensive API platform

## Welcome to SundayPyjamas AI Suite

Integrate advanced language models and AI features directly into your applications with our powerful API platform. Built for developers who need reliable, scalable AI solutions.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Get up and running with your first API call in minutes. Generate your API key and make your first request.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Learn how to securely authenticate your requests using API keys and best practices.
  </Card>
</CardGroup>

## Core Features

Everything you need to build AI-powered applications.

<CardGroup cols={2}>
  <Card title="Chat API" icon="comments" href="/chat-api">
    Advanced conversational AI with streaming responses and multiple model support.
  </Card>

  <Card title="Multiple AI Models" icon="brain" href="/chat-api#available-models">
    Access powerful models like Llama 3.3 70B Versatile for various use cases.
  </Card>

  <Card title="Streaming Responses" icon="bolt" href="/examples/javascript#streaming-responses">
    Real-time AI interactions with progressive response streaming.
  </Card>

  <Card title="Workspace Isolation" icon="shield-check" href="/authentication#permissions-and-access-control">
    Secure multi-tenant usage with workspace-level isolation and permissions.
  </Card>
</CardGroup>

## Code Examples

Ready-to-use implementations in your favorite programming language.

<CardGroup cols={3}>
  <Card title="JavaScript/TypeScript" icon="js" href="/examples/javascript">
    Complete examples for Node.js and browser applications with React components.
  </Card>

  <Card title="Python" icon="python" href="/examples/python">
    Comprehensive Python integration with async support and batch processing.
  </Card>

  <Card title="cURL" icon="terminal" href="/examples/curl">
    Command-line examples for testing and shell script automation.
  </Card>
</CardGroup>

## API Reference

<Card title="Chat API Reference" icon="code" href="/api-reference/chat/introduction">
  Complete API reference with request/response schemas, parameters, and examples.
</Card>

## Essential Resources

<CardGroup cols={2}>
  <Card title="Rate Limits & Usage" icon="gauge-high" href="/rate-limits">
    Understand token usage, rate limits, and optimization strategies for cost-effective usage.
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/errors">
    Comprehensive guide to error codes, troubleshooting, and robust error handling patterns.
  </Card>
</CardGroup>

## Quick Example

Get started immediately with this simple example:

<CodeGroup>
  ```javascript JavaScript theme={null}
  const response = await fetch('https://suite.sundaypyjamas.com/api/v1/chat', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer spj_ai_your_api_key_here',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      messages: [
        { role: 'user', content: 'Hello! Write me a professional email greeting.' }
      ]
    })
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://suite.sundaypyjamas.com/api/v1/chat',
      headers={'Authorization': 'Bearer spj_ai_your_api_key_here'},
      json={'messages': [{'role': 'user', 'content': 'Hello! Write me a professional email greeting.'}]}
  )
  ```

  ```bash cURL theme={null}
  curl -X POST https://suite.sundaypyjamas.com/api/v1/chat \
    -H "Authorization: Bearer spj_ai_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{"messages": [{"role": "user", "content": "Hello! Write me a professional email greeting."}]}'
  ```
</CodeGroup>

<Note>
  API keys use the format `spj_ai_[64-character-string]` and can be generated from your workspace settings.
</Note>
