Welcome to the Snippets AI API
The Snippets AI API allows you to programmatically manage snippets, folders, tags, and variations. Build powerful integrations to automate your workflow and sync your code snippets across different platforms.Authentication
Learn how to authenticate your API requests
Rate Limiting
Understand rate limits and usage quotas
Error Codes
Reference for all API error codes
Usage & Billing
Learn about API usage costs and billing
Base URL
All API requests should be made to:Quick Start
Get up and running in minutes:1. Get Your API Key
- Log into your Snippets AI workspace
- Navigate to Admin → API Access
- Create a new API key with appropriate team permissions
- Copy the secret key (you won’t be able to see it again)
2. Make Your First Request
Here’s a simple example to fetch a snippet:API Resources
The API is organized around four main resource types:Snippets
Manage your code and text snippets
Variations
Handle multiple versions of snippets
Folders
Organize snippets into folders
Tags
Categorize snippets with tags
Key Features
🔐 Secure Authentication
All requests use Bearer token authentication with API keys that have granular team-level permissions.⚡ Rate Limited
The API is rate-limited to 20 requests per minute per API key to ensure fair usage and system stability.💰 Usage-Based Billing
Pay only for what you use: $10 per 100,000 API requests. Each endpoint clearly documents its cost.📊 Detailed Metadata
Every response includes usage information, pagination details, and comprehensive metadata about the operation.🔄 Batch Operations
Save on API costs by using batch endpoints to create, update, or delete multiple resources at once.Response Format
All API responses follow a consistent format:Success Response
success: Boolean indicating if the request was successfuldata: The requested data or resultusage: Information about API usage and remaining quotametadata: Additional context about the operation
Error Response
success: Alwaysfalsefor errorsmessage: Human-readable error descriptionerror: Additional error details (when available)