> For the complete documentation index, see [llms.txt](https://nexin-ai.gitbook.io/nexin-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nexin-ai.gitbook.io/nexin-ai/api-documentation.md).

# API Documentation 📡

The NEXIN AI API allows developers to integrate our powerful features into their own platforms. Below is an overview of available endpoints:

## Base URL 🌐

```
https://api.nexinai.com/v1
```

## Authentication 🔑

All requests require an API key. Sign up on our platform to obtain your key.

* **Header:** `Authorization: Bearer YOUR_API_KEY`

## Endpoints 🛠️

**1. Get Market Data 📊**

Fetch real-time market data for Solana meme coins.

* **Endpoint:** `/market-data`
* **Method:** `GET`
* **Parameters:**
  * `coin` (string): The symbol of the meme coin (e.g., `$SAMO`).
  * `interval` (string): Timeframe for data (e.g., `1m`, `1h`, `1d`).
* **Response:**

```
{
  "coin": "$SAMO",
  "price": 0.045,
  "volume": 123456,
  "change": "+3.5%"
}
```

**2. Predict Price Trends 🔮**

Get AI-driven predictions for coin price movements.

* **Endpoint:** `/predict`
* **Method:** `POST`
* **Parameters:**
  * `coin` (string): The symbol of the meme coin.
  * `duration` (string): Prediction duration (e.g., `1h`, `24h`).
* **Response:**

```
{
  "coin": "$SAMO",
  "prediction": "up",
  "confidence": 95
}
```

**3. Set Alerts 🚨**

Create custom alerts for price thresholds.

* **Endpoint:** `/alerts`
* **Method:** `POST`
* **Parameters:**
  * `coin` (string): The symbol of the meme coin.
  * `threshold` (float): Price to trigger the alert.
  * `direction` (string): `above` or `below`.
* **Response:**

```
{
  "status": "success",
  "message": "Alert created for $SAMO above $0.05"
}
```
