---
title: "POST /v2/text-compare"
method: POST
path: "/v2/text-compare"
---

# POST /v2/text-compare

`POST /v2/text-compare`

Compare two texts to find similarities and differences between them. This endpoint analyzes both texts and returns detailed information about matching content, word counts, and similarity scores.

## Request body

- TextCompare
  - `first_text` string, required — The first text to compare. Maximum 120,000 characters.
  - `second_text` string, required — The second text to compare against the first text. Maximum 120,000 characters.

## Response `200`

Text comparison response

- TextCompareResponse
  - `status` integer — HTTP status code representing the result of the text comparison request
  - `similarity_score` number — Overall similarity score between the two texts (0-100). 0 means no similarity, 100 means identical.
  - `first_text` object
    - `total_word_count` integer — Total number of words in the first text
    - `matching_word_count` integer — Number of words that match with the second text
    - `similarity_percentage` number — Percentage of matching content in the first text
    - `items` object[] — List of matching segments in the first text
      - `type` string — Type of match (identical, similar, etc.)
      - `word_count` integer — Number of words in this segment
      - `index_start` integer — Starting index of the segment in the text
      - `length` integer — Length of the segment in characters
  - `second_text` object
    - `total_word_count` integer — Total number of words in the second text
    - `matching_word_count` integer — Number of words that match with the first text
    - `similarity_percentage` number — Percentage of matching content in the second text
    - `items` object[] — List of matching segments in the second text
      - `type` string — Type of match (identical, similar, etc.)
      - `word_count` integer — Number of words in this segment
      - `index_start` integer — Starting index of the segment in the text
      - `length` integer — Length of the segment in characters
  - `credits_used` integer — The credits_used field represents the number of credits consumed for processing your request. Each text comparison request consumes the total number of words in both texts divided by 2.
  - `credits_remaining` integer — The credits_remaining field shows how many credits you have left in your account after your request has been processed.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required (insufficient credits)
- `403` — Forbidden
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/gowinston/apis/winston-ai-api.md) · [All operations](https://skmtc.dev/gowinston/apis/winston-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gowinston/winston-ai-api/revisions/36538c5ec651/schema)
