# Aethir Mesh

Aethir Mesh is a proprietary LLM API platform built by Aethir that offers direct API access to top-tier open-source models, including DeepSeek V4, Kimi K2.6, GLM-5.1, MiniMax-M2.5, Qwen3.6-27B, and more. Inference runs exclusively on Aethir's GPU infrastructure, keeping compute and model access within the same decentralized network that powers Aethir Claw and enterprise GPU deployments for 150+ partners and clients worldwide.

Unlike OpenRouter, which aggregates hundreds of models, including closed frontier models (GPT, Claude, Gemini) by routing to their APIs, Aethir Mesh takes the opposite approach. Open-weight models run directly on Aethir's own GPU infrastructure. Aethir is the compute layer actually serving the model, not a billing wrapper over someone else's API.

**Official website:** <https://mesh.aethir.com/> \
**Official API endpoint:** <https://mesh-api.aethir.com/>

### CURL Example

```bash
curl --location 'https://mesh-api.aethir.com/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "model": "MiniMax-M2.5",
  "messages": [{"role": "user", "content": "Hello!"}],
  "stream": true
}'
```

Aethir Mesh is an open-source model aggregation platform operated by Aethir. Aethir directly deploys and provides open-source model services. Users purchase credits and generate API keys to call all supported models through the unified Aethir Mesh API.

* **Compatible API formats:** OpenAI Chat Completion and Response
* **Model source:** Open-source models hosted by Aethir
* **Billing method:** Credit-based usage
* **Response modes:** Supports streaming and non-streaming
* **Authentication method:** Bearer API key

### Overview

*Unified entry point - reduced integration costs*

Aethir Mesh provides a unified API access interface for calling open-source models deployed and operated by Aethir. Developers can purchase credits, create API keys, and use those keys to call any model currently supported by Aethir Mesh.

If you are already using standard OpenAI-compatible client logic, you typically only need to switch the base URL to Aethir Mesh, use an Aethir Mesh API key, and select a supported Aethir Mesh model name to reuse your existing request format.

**Standard Compatibility:** Retains common request fields and response structures, reducing migration and adaptation effort.

**Unified Authentication:** All endpoints use the same Aethir Mesh Bearer API key. A single API key provides access to all supported models, subject to account credit limits, model availability, and usage restrictions.

**Easy to Scale:** Supports open-source model aggregation, model routing, middleware wrapping, proxy forwarding, and multi-model scheduling scenarios hosted by Aethir.

**Compatibility Scope:** References to OpenAI in this documentation refer only to compatible request and response formats. Requests are processed by open-source models hosted by Aethir, not by the official OpenAI model API.

### Credits & API Keys

*All requests require credits and authentication*

#### Usage Process

1. Purchase credits in Aethir Mesh.
2. Generate an API key in the Aethir Mesh console.
3. Call `https://mesh-api.aethir.com` with `Authorization: Bearer your-api-key`.
4. Usage will consume credits based on model and request type.

> **Note:** Keep your API key secure. Do not expose the key directly in front-end code, public repositories, or client-side environments that may be read by third parties.

### Supported AI Models

*Aethir Mesh only supports open-source models*

Use one of the following Aethir Mesh model names in the `model` field or path parameter. Examples in this documentation use `MiniMax-M2.5` as the default model.

For Aethir Mesh users, the access method is always the Aethir Mesh API base URL: `https://mesh-api.aethir.com`.

| Model               | Model Family | License                                   | Access Method   |
| ------------------- | ------------ | ----------------------------------------- | --------------- |
| `glm-5.1`           | GLM          | MIT License, free commercial use          | Aethir Mesh API |
| `glm-4.7`           | GLM          | MIT License, free commercial use          | Aethir Mesh API |
| `MiniMax-M2.5`      | MiniMax      | MIT License, free commercial use          | Aethir Mesh API |
| `qwen3.5-9b`        | Qwen         | Apache 2.0 License, free commercial use   | Aethir Mesh API |
| `qwen3.5-397b-a17b` | Qwen         | Apache 2.0 License, free commercial use   | Aethir Mesh API |
| `qwen3.6-27b`       | Qwen         | Apache 2.0 License, free commercial use   | Aethir Mesh API |
| `qwen3.6-35b-a3b`   | Qwen         | Apache 2.0 License, free commercial use   | Aethir Mesh API |
| `deepseek-v4-pro`   | DeepSeek     | MIT License, free commercial use          | Aethir Mesh API |
| `deepseek-v4-flash` | DeepSeek     | MIT License, free commercial use          | Aethir Mesh API |
| `kimi-k2.6`         | Kimi         | Modified MIT License, free commercial use | Aethir Mesh API |
| `kimi-k2.5`         | Kimi         | Modified MIT License, free commercial use | Aethir Mesh API |

### Authentication

*All requests must be authenticated*

All API requests must use the Aethir Mesh base URL and include the `Authorization` header. API keys are generated after purchasing credits in Aethir Mesh.

#### Base URL

```
https://mesh-api.aethir.com
```

#### Request Headers

```
Authorization: Bearer your-api-key
Content-Type: application/json
```

### OpenAI-Compatible Endpoints

*Fully compatible with common calling formats*

Supports OpenAI-compatible request and response formats. Requests are processed by open-source models hosted by Aethir, not OpenAI models.

#### Chat Completion: Streaming

**Endpoint:** `POST https://mesh-api.aethir.com/v1/chat/completions`

**Request Body**

Use a JSON object conforming to the OpenAI Chat Completions format. Default example model: `MiniMax-M2.5`. Set `stream: true`.

```json
{
  "model": "MiniMax-M2.5",
  "messages": [
    {"role": "user", "content": "Hello!"}
  ],
  "stream": true
}
```

**Response**

The server returns an SSE event stream. Each line starts with `data:`.

```
data:{"id":"019e82bd6b5784fd39bd8be0de573b52","object":"chat.completion.chunk","created":1780309912,"model":"MiniMaxAI/MiniMax-M2.5","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":null}],"usage":{"prompt_tokens":40,"completion_tokens":0,"total_tokens":40}}
data:{"id":"019e82bd6b5784fd39bd8be0de573b52","object":"chat.completion.chunk","created":1780309912,"model":"MiniMaxAI/MiniMax-M2.5","choices":[{"index":0,"delta":{"content":null,"reasoning_content":"The","role":"assistant"},"finish_reason":null}],"usage":{"prompt_tokens":40,"completion_tokens":1,"total_tokens":41}}
......
data:{"id":"019e82bd6b5784fd39bd8be0de573b52","object":"chat.completion.chunk","created":1780309912,"model":"MiniMaxAI/MiniMax-M2.5","choices":[{"index":0,"delta":{"content":"?","role":"assistant"},"finish_reason":null}],"usage":{"prompt_tokens":40,"completion_tokens":44,"total_tokens":84}}
data:{"id":"019e82bd6b5784fd39bd8be0de573b52","object":"chat.completion.chunk","created":1780309912,"model":"MiniMaxAI/MiniMax-M2.5","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop"}],"usage":{"prompt_tokens":40,"completion_tokens":44,"total_tokens":84}}
data:[DONE]
```

### Claude-Compatible Endpoints

Compatible with Anthropic Claude calling specification. Compatible with the Claude Messages API request format, supporting standard message structure and streaming event responses.

#### Streaming

**Endpoint:** `POST https://mesh-api.aethir.com/v1/messages`

**Request Body**

Consistent with non-streaming calls, but requires setting `stream: true`.

```json
{
  "model": "MiniMax-M2.5",
  "stream": true,
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}
```

**Response**

The server returns SSE event streams. Each line starts with `data:`.

```
event:message_start
data:{"type":"message_start","message":{"id":"msg_Zj1H6XS59vj5Q428R9UB0mU8","type":"message","role":"assistant","content":[],"model":"MiniMaxAI/MiniMax-M2.5","stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":40,"output_tokens":0}}}
event:content_block_start
data:{"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":""}}
event:content_block_delta
data:{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"The"}}
......
event:content_block_delta
data:{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"!"}}
event:content_block_stop
data:{"type":"content_block_stop","index":1}
event:message_delta
data:{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":40,"output_tokens":60}}
event:message_stop
data:{"type":"message_stop"}
```

### Error Handling

*Unified return structure for easy programmatic handling*

Error responses typically return standard HTTP status codes along with a JSON error object.

```json
{
  "error": {
    "message": "Error Description",
    "type": "Error Type",
    "code": "code"
  }
}
```

### Sample Code

*Ready to copy into your existing project*

The following examples show how to make requests to Aethir Mesh using Python and cURL with different compatible interface formats. The base URL is `https://mesh-api.aethir.com` and the default model is `MiniMax-M2.5`.

#### OpenAI Chat Completion — Streaming

**Python**

```python
import requests

url = "https://mesh-api.aethir.com/v1/chat/completions"
headers = {
    "Authorization": "Bearer your-api-key",
    "Content-Type": "application/json"
}
data = {
    "model": "MiniMax-M2.5",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": True
}
response = requests.post(url, headers=headers, json=data, stream=True)
for line in response.iter_lines():
    if line:
        print(line.decode("utf-8"))
```

**cURL**

```bash
curl --location 'https://mesh-api.aethir.com/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "model": "MiniMax-M2.5",
  "messages": [{"role": "user", "content": "Hello!"}],
  "stream": true
}'
```

#### Claude-Compatible Streaming

**Python**

```python
import requests

url = "https://mesh-api.aethir.com/v1/messages"
headers = {
    "Authorization": "Bearer your-api-key",
    "Content-Type": "application/json"
}
data = {
    "model": "MiniMax-M2.5",
    "stream": True,
    "messages": [{"role": "user", "content": "Hello!"}]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
```

**cURL**

```bash
curl --location 'https://mesh-api.aethir.com/v1/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "model": "MiniMax-M2.5",
  "stream": true,
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}'
```

### Notes

*Review carefully before going live*

**Secure key storage:** In production environments, store API keys server-side or in a secure credential management system. Never expose them directly to the browser.

**Manage credits:** Requests consume Aethir Mesh credits. Monitor your credit balance and usage before running production workloads.

**Handle streaming data correctly:** Streaming responses use the SSE protocol. Clients must read line by line and parse according to the event format.

**Control request rate:** All endpoints may be subject to rate limits. Implement retry, backoff, and circuit-breaker mechanisms on the client side.

**Monitor model and version changes:** As Aethir Mesh updates its list of hosted open-source models, model names, available features, pricing, token billing, and field compatibility may change.

**Sensitive data transmission:** If privacy or commercially sensitive information is involved, ensure that request paths, logs, and persistence policies meet security requirements.

API keys are passed via `Authorization: Bearer your-api-key` for all requests, including calls using the Claude Messages protocol.

Open-source models hosted on the Aethir Mesh platform support streaming by default. Very few models support non-streaming mode; therefore, it is recommended that clients uniformly use streaming calls.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aethir.com/aethir-mesh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
