Skip to main content

Overview

This guide covers setting up your development environment for integrating with the SundayPyjamas AI Suite API, including local testing, documentation preview, and development best practices.
This documentation can be run locally for contributions and updates.

API Development Setup

Environment Configuration

1

Get Your API Key

Generate an API key from your SundayPyjamas workspace:
  1. Navigate to SettingsAPI tab
  2. Click “Generate API Key”
  3. Save the key securely
2

Set Environment Variables

Create a .env file in your project:
3

Install Dependencies

Choose your preferred language and install required packages:

Local Documentation Development

If you want to contribute to this documentation or run it locally:
1

Prerequisites

  • Node.js version 19 or higher
  • Git for version control
2

Install Documentation CLI

3

Clone and Preview

A local preview will be available at http://localhost:3000.

Custom Ports

Testing Your Integration

Basic Connection Test

Integration Testing

Create a comprehensive test suite:

Development Tools

VS Code Extensions

  • MDX extension for documentation
  • Prettier for code formatting
  • REST Client for API testing
  • dotenv for environment variables

API Testing Tools

  • Postman for interactive testing
  • Insomnia for REST API testing
  • HTTPie for command-line testing
  • Thunder Client for VS Code

Environment Validation

Create a validation script to check your setup:

Documentation Tools

Building for Production

Troubleshooting

Common solutions:
  • Verify API key format (spj_ai_[64-characters])
  • Check environment variable loading
  • Ensure HTTPS is used for API URL
  • Verify workspace permissions
Common solutions:
  • Update documentation CLI: npm update -g mint
  • Clear cache: rm -rf ~/.mintlify && mint dev
  • Check MDX syntax in files
  • Validate JSON configuration
Common solutions:
  • Check .env file location (project root)
  • Verify no extra spaces in variable assignments
  • Ensure proper dotenv loading in code
  • Check for conflicting environment variables

Next Steps

API Quickstart

Start making your first API calls with example code

Code Examples

Explore complete implementation examples

Authentication

Learn about API key management and security

Rate Limits

Understand usage optimization and monitoring
Join our developer community for support, updates, and to share your implementations with other developers.