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

# Text

**Base URL**

```
https://api.kyle.so/text
```

***

### /reverse

Reverses the input text (`x`)

```
GET /reverse?text=x
```

> Example: `GET /text/reverse?text=hello`

#### Response:

```typescript
{
    "reversed": string,
    "original": string
}
```

#### Errors:

* `400`: No text provided

***

### /length

Returns the length of the input text (`x`)

```
GET /length?text=x
```

> Example: `GET /text/length?text=hello`

#### Response:

```typescript
{
    "length": {
        "characters": number,
        "words": number
    },
    "text": string
}
```

#### Errors:

* `400`: No text provided

***

### /uppercase

Converts the input text (`x`) to uppercase

```
GET /uppercase?text=x
```

> Example: `GET /text/uppercase?text=hello`

#### Response:

```typescript
{
    "uppercase": string,
    "original": string
}
```

#### Errors:

* `400`: No text provided

***

### /lowercase

Converts the input text (`x`) to lowercase

```
GET /lowercase?text=x
```

> Example: `GET /text/lowercase?text=HELLO`

#### Response:

```typescript
{
    "lowercase": string,
    "original": string
}
```

#### Errors:

* `400`: No text provided

***

### /replace

Replaces all occurrences of `search` with `replace` in the input text (`x`)

```
GET /replace?text=x&search=y&replace=z
```

> Example: `GET /text/replace?text=hello&search=he&replace=no`

#### Response:

```typescript
{
    "replaced": string,
    "original": string
}
```

#### Errors:

* `400`: No text provided

***

### /lorem

Generates `x` words of lorem ipsum text

```
GET /lorem?length=x
```

> Example: `GET /text/lorem?length=10`

#### Response:

```typescript
{
    "lorem": string,
    "length": number
}
```

#### Constraints:

* 0 < `x` < 2000

#### Errors:

* `400`: Invalid parameter

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kyle.so/dickey-api/text.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
