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

# API Reference

> Complete API reference for the Sqwish optimization service

## Overview

Our API provides endpoints for optimizing text prompts in real-time. The main endpoint is `/v1/optimization/optimize`.

## Base URL

```
https://api.sqwish.ai
```

## Authentication

All API requests require authentication using your API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Rate Limits

* **Free tier**: 100 requests per hour
* **Pro tier**: 10,000 requests per hour
* **Enterprise**: Custom limits

## Response Codes

| Code | Description                      |
| ---- | -------------------------------- |
| 200  | Success                          |
| 400  | Bad Request - Invalid parameters |
| 401  | Unauthorized - Invalid API key   |
| 429  | Rate limit exceeded              |
| 500  | Internal server error            |

## Endpoints

<CardGroup cols={2}>
  <Card title="Optimize Text" icon="wand-magic-sparkles" href="/api-reference/endpoint/optimize">
    Optimize text prompts to reduce token usage
  </Card>
</CardGroup>
