---
docId: doc_48e66ddf8a99426b8f126c3b6db589f9
title: Suggest a title and description
description: Ask the AI for a title and a description for a file based on its content. It saves nothing; to use them, update the file.
api:
  group: archivos
  auth: bearer
  operations:
    - operationId: suggestMetadata
      method: POST
      path: '/v1/files/{fileId}/metadata/suggestion'
      postmanName: Suggest a title and description
---

<script>
  import { Ways } from '$lib/components';
</script>

# Suggest a title and description

Ask AI to suggest a title and description from the file’s content. Send its `fileId`; if you want to use the suggestion, save it with [Update a file](/api-reference/files/update#rename). **This request saves no changes.**



## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X POST "https://api.platic.ai/v1/files/$FILE_ID/metadata/suggestion" \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fields": ["title", "description"] }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.files.suggestMetadata("file_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `fileId` | string | The file | ✓ |

## Request body

Optional. Without a body, it suggests both:

```json
{ "fields": ["title", "description"] }
```

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `fields` | array | What to suggest: `title`, `description` or both. | Both |

## Response

```json
{
  "status": "success",
  "data": {
    "title": "Returns and refunds policy",
    "description": "Deadlines to return a product, conditions, exceptions and how the refund is made. Consult it when the customer wants to return or exchange something."
  }
}
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Suggested title, up to 200 characters. |
| `description` | string | Suggested description, up to 1024 characters. |

The suggestion comes in the language of the content (Spanish if it is not clear).

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `403` | `RESOURCE_NOT_ACCESSIBLE` | You do not have Integrations nor can you edit all the agents that use it. |
| `409` | `FILE_NOT_READY` | The file does not have content ready yet. |
| `410` | `FILE_DELETED` | The file was already deleted. |
| `503` | `INTERNAL_ERROR` | The model did not answer. Try again. |

The ones that apply to all operations are in [common errors](/api-reference/files#common-errors).

## Notes

- You do not need to ask for it when creating: if you create a file without a title or without a description, Platica generates them by itself when the content is ready (see [automatic names](/api-reference/files#automatic-names)).
- It requires the same permission as [Get a file](/api-reference/files/get).
