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

# Introduction

> Everything you need to integrate the Compresto Image Compression API.

The Compresto API provides programmatic image compression for your applications. Compress images on-the-fly with simple REST endpoints.

## Base URL

```
https://api.compresto.app
```

## Authentication

All API requests require an API key. Include your key in the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: ck_your_api_key" https://api.compresto.app/v1/compress
```

<Note>
  Get your API key from the [Compresto Dashboard](https://compresto.app/dashboard).
</Note>

## Available Endpoints

<CardGroup cols={2}>
  <Card title="POST /v1/compress" icon="image" href="/api-reference/endpoint/compress">
    Compress an image with quality and format options
  </Card>

  <Card title="GET /v1/usage" icon="chart-bar" href="/api-reference/endpoint/usage">
    Check your API usage statistics
  </Card>
</CardGroup>

## Rate Limits

The API enforces per-user rate limits based on your subscription plan:

| Plan | Rate Limit | Monthly Quota  |
| ---- | ---------- | -------------- |
| Free | 60 req/min | 500 requests   |
| Pro  | 60 req/min | 5,000 requests |

* **Rate limits** are enforced per user
* **Monthly quotas** reset on the 1st of each month
* Use the `/v1/usage` endpoint to check your current usage

## Response Codes

| Code  | Description                                                |
| ----- | ---------------------------------------------------------- |
| `200` | Success                                                    |
| `400` | Bad request - invalid parameters                           |
| `401` | Unauthorized - invalid or missing API key                  |
| `429` | Rate limit exceeded (per-minute) or monthly quota exceeded |
| `500` | Server error                                               |

## Support

Need help? Contact us at [support@compresto.app](mailto:support@compresto.app) or visit [compresto.app](https://compresto.app).
