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

# API Overview

> Base URL, authentication, endpoints, and error handling for the Snipp API.

## Overview

The Snipp API is the public, third-party integration surface. Use it to upload media, manage your files, fetch posts, and build apps and SDKs on top of Snipp.

For first-party clients (for example, the Snipp mobile app) that need account-level features such as the discover feed, likes, comments, blocking, and profile editing, use the [Relay API](/relay-reference/introduction) instead.

## Base URL

The default base URL is:

```
api.snipp.gg
```

`api.snipp.gg` is a load balancer sitting in front of the upload servers. It resolves to the nearest healthy region and connects straight to it, with no per-request size cap, so your file size limit is whatever your plan allows. It is the right default for everything, including uploads.

### Regional endpoints

| Region | Host |
| - | - |
| EU West | `eu-west-1.api.snipp.gg` |
| US West | `us-west-1.api.snipp.gg` |

Regional endpoints reach the same servers as `api.snipp.gg` and upload at the same speed, so pinning one buys you no performance. Use them when you want to control which region stores your files, or to force a specific server instead of letting the load balancer choose.

To see which region you are being routed to, call [`GET /region`](/api-reference/endpoint/region) on any host.

```bash theme={null}
curl -s https://api.snipp.gg/region
```

### Alternative endpoint

`flux.snipp.gg` serves the same API over a separate network path. Requests are buffered before they reach the server, so uploads there are capped at **100 MB per request** and large uploads are several times slower.

Use it only as a fallback if `api.snipp.gg` is ever unreachable. For normal use, stay on `api.snipp.gg`.

## Authentication

Include your API key in the `api-key` header with every request. See [Authentication](/authentication) for details on locating your key and security best practices.

```
api-key: YOUR_API_KEY
```

## Endpoints

| Method | Endpoint | Description |
| - | - | - |
| `POST` | [`/upload`](/api-reference/endpoint/upload) | Upload 1 to 50 images or videos. Creates a post. |
| `GET` | [`/posts`](/api-reference/endpoint/posts/list) | List your posts. |
| `GET` | [`/posts/{code}`](/api-reference/endpoint/posts/get) | Fetch a post. |
| `PATCH` | [`/posts/{code}`](/api-reference/endpoint/posts/update) | Change a post's title, description or privacy. |
| `DELETE` | [`/posts/{code}`](/api-reference/endpoint/posts/delete) | Delete a post. |
| `POST` | [`/posts/{code}/files`](/api-reference/endpoint/posts/add-files) | Add files to a post. |
| `DELETE` | [`/posts/{code}/files/{name}`](/api-reference/endpoint/posts/delete-file) | Remove one file from a post. |
| `POST` | [`/posts/{code}/report`](/api-reference/endpoint/posts/report) | Report a post. |
| `GET` | [`/users/{id}`](/api-reference/endpoint/users/get) | Fetch a user. Use `@me` for your own account. |
| `GET` | [`/users/{id}/posts`](/api-reference/endpoint/users/posts) | List a user's public posts. |
| `POST` | [`/users/{id}/report`](/api-reference/endpoint/users/report) | Report a user. |
| `GET` | [`/gifs`](/api-reference/endpoint/gifs) | Browse public GIFs. No key required. |
| `POST` | [`/convert`](/api-reference/endpoint/convert) | Convert an image or video. Returns the file and stores nothing. |
| `GET` | [`/usage-history`](/api-reference/endpoint/usage-history) | Your daily upload activity for the last 365 days. |
| `GET` | [`/analytics`](/api-reference/endpoint/analytics) | Your analytics over time. Plus only. |
| `GET` | [`/region`](/api-reference/endpoint/region) | The region serving the request. No key required. |

Looking for the discover feed, likes, comments, blocking, profile editing, avatar uploads, or anything that powers the full Snipp experience? See the [Relay API](/relay-reference/introduction).

## Conventions

* Request and response bodies are JSON with `snake_case` keys, except file uploads (`multipart/form-data`) and the converted file from `/convert`.
* Resources are addressed in the path: `/posts/{code}`, `/users/{id}`. HTTP methods are the verbs.
* A single resource comes back under its singular name (`{"post": ...}`), a list under its plural name with [pagination](/concepts/pagination) fields.
* Timestamps are ISO 8601 in UTC and end in `_at`. Counts end in `_count`.
* Every response carries a `request-id` header.

## Errors

Errors return a non-`2xx` status and an `error` object with a stable `type` and a readable `message`:

```json theme={null}
{
  "error": {
    "type": "unauthorized",
    "message": "Missing api-key header."
  }
}
```

See [Errors](/concepts/errors) for every type and status.

## Rate Limits

Rate limits apply per endpoint, not per account. See [Rate Limits](/concepts/rate-limits) for the full table and how to handle `429` responses.

Upgrading from the old endpoints such as `/uploads` or `/editUpload`? See the [migration guide](/migration).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.