Skip to main content

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.

Quick Start

Get up and running with your first API call in minutes. Generate your API key and make your first request.

Authentication

Learn how to securely authenticate your requests using API keys and best practices.

Core Features

Everything you need to build AI-powered applications.

Chat API

Advanced conversational AI with streaming responses and multiple model support.

Agents API

Create autonomous or assist-mode AI agents with tools, memory, and streaming runs.

RAG API

Upload documents and query them with retrieval-augmented, source-cited answers.

Artifacts API

Turn your own aggregated data into structured, LLM-authored insight reports.

Image API

Generate and edit images with Gemini image models.

Vector Store API

Per-app vector collections for custom similarity search and retrieval pipelines.

Workspace Isolation

Secure multi-tenant usage with workspace-level isolation and permissions.

Code Examples

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

JavaScript/TypeScript

Complete examples for Node.js and browser applications with React components.

Python

Comprehensive Python integration with async support and batch processing.

cURL

Command-line examples for testing and shell script automation.

API Reference

Chat

Agents

RAG

Artifacts

Image

Vector Store

Apps

Essential Resources

Rate Limits & Usage

Understand token usage, rate limits, and optimization strategies for cost-effective usage.

Error Handling

Comprehensive guide to error codes, troubleshooting, and robust error handling patterns.

Quick Example

Get started immediately with this simple example:
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.' }
    ]
  })
});
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.'}]}
)
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."}]}'
API keys use the format spj_ai_[64-character-string] and can be generated from your workspace settings.