---
title: "Structure a raw hotel room description"
---

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

# Structure a raw hotel room description

Path: Nicer API › Assistant

`POST /agent/room-description`

URL: `https://api.nicer.travel/agent/room-description`

Turns a raw hotel room description, often in capitals, into a clean room title and sections of bullet points (highlights, meals, amenities, cancellation, beds, bathroom and the rest), with one model call. Answers are kept for 30 days by description and currency; noCache=true asks for a fresh one. Anyone may call it without a token, so the Pay page can, up to 50 times an hour per IP address.

## Query parameters

- `noCache` (`agent.roomDescription.query.noCache`; string, optional)
  - one of `"true"`

## Request body

_Required._

- `description` (`agent.roomDescription.description`; string, required)
  - maxLength: `16000` · minLength: `1`
- `currencyCode` (`agent.roomDescription.currencyCode`; string, optional)
  - maxLength: `3`

## Example request

```json
{
  "currencyCode": "str",
  "description": "string"
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.agent.roomDescription({
  "description": "string"
});
```

### Nicer CLI

```bash
nicer agent room-description --input - <<'JSON'
{
  "description": "string"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url https://api.nicer.travel/agent/room-description \
  --header 'Content-Type: application/json' \
  --data '
{
  "currencyCode": "str",
  "description": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/agent/room-description';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({currencyCode: 'str', description: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/agent/room-description"

payload = {
    "currencyCode": "str",
    "description": "string"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "roomTitle": "string",
  "sections": [
    {
      "infos": [
        "string"
      ],
      "sectionTitle": "Highlights"
    }
  ]
}
```

- `roomTitle` (`agent.roomDescription.response.200.roomTitle`; string, required) — Clean, concise room name e.g. 'Standard King Guest Room', 'Deluxe Suite Ocean View'
- `sections` (`agent.roomDescription.response.200.sections`; array of object, required) — Organized sections of room information, omit empty sections
  - `infos` (`agent.roomDescription.response.200.sections.infos`; array of string, required) — List of clean, human-readable bullet points for this section
  - `sectionTitle` (`agent.roomDescription.response.200.sections.sectionTitle`; string, required) — Section category — only include sections that have relevant content
    - one of `"Highlights"`, `"Meal"`, `"Amenities"`, `"Cancellation information"`, `"Bed & Bedding"`, `"Bathroom"`, `"Room Features"`, `"Internet & Technology"`, `"View"`, `"Accessibility"`, `"Location"`, `"Loyalty & Perks"`, `"Other"`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.roomDescription.response.400.errorCode`; string, required)
- `errorMessage` (`agent.roomDescription.response.400.errorMessage`; string, required)

### 429

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.roomDescription.response.429.errorCode`; string, required)
- `errorMessage` (`agent.roomDescription.response.429.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Assistant/agent.roomDescription/index.md
