# Text Similarity Post Similarity

> Compares two texts and returns a cosine similarity score.

- Skill: `gabrielmoreira/text-similarity-post-similarity` (Agent Skill)
- Install (CLI): `npx skillmds@latest add gabrielmoreira/text-similarity-post-similarity`
- Raw SKILL.md: https://api.skillmd.com/api/skills/gabrielmoreira/text-similarity-post-similarity/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: gabrielmoreira (https://skillmd.com/u/gabrielmoreira)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/gabrielmoreira/text-similarity-post-similarity

---


## Endpoint

**POST https://requiems.xyz/v1/text/similarity**

## Compare Text Similarity

Compares two texts and returns a cosine similarity score.

## Parameters

| Name | Type | Required | Location | Description |
| ---- | ---- | -------- | -------- | ----------- |
| `text1` | string | yes | body | The first text to compare. |
| `text2` | string | yes | body | The second text to compare. |

## Request Example

```json
{
  "text1": "The cat sat on the mat",
  "text2": "A cat was sitting on a mat"
}
```

## Response Example

```json
{
  "data": {
    "similarity": 0.4364,
    "method": "cosine"
  },
  "metadata": {
    "timestamp": "2026-01-01T00:00:00Z"
  }
}
```

## Response Fields

| Field | Type | Description |
| ----- | ---- | ----------- |
| `similarity` | number | Cosine similarity score between the two texts, in the range [0, 1]. |
| `method` | string | The algorithm used. Currently always 'cosine'. |

## Errors

- `422` **validation_failed** — One or both text fields are missing or empty.
- `400` **bad_request** — The request body is missing or malformed.
- `500` **internal_error** — Unexpected server error.

