# WormGPT API

A raw, uncensored AI assistant.

**Base URL:** `https://wormgpt.ornzora.eu.cc`

---

## Endpoints

### `GET /`
Returns this documentation page.

---

### `GET /c/<text>`
Send a single message via URL path.

**Example:**
```bash
curl "https://wormgpt.ornzora.eu.cc/c/Hello%2C%20WormGPT!"
```

**Response:**
```json
{ "wormgpt": "Hello! How can I help you?" }
```

---

### `POST /`
Send a message or a conversation history via JSON body.

**Simple message:**
```json
{ "text": "Your message here" }
```

**With conversation history:**
```json
{
  "messages": [
    { "role": "user", "content": "Hello" },
    { "role": "assistant", "content": "Hi! How can I help?" },
    { "role": "user", "content": "Tell me a joke" }
  ]
}
```

> Only `user` and `assistant` roles are accepted. `system` messages are stripped.

---

## Response Format

All responses return a JSON object:
```json
{ "wormgpt": "..." }
```

On error:
```json
{ "error": "Description of what went wrong" }
```

---

## HTTP Methods

Only `GET`, `POST`, and `OPTIONS` are supported. All others return `405 Method Not Allowed`.
