---
title: "How many X credits one post (or a whole thread) would use, before it is published or scheduled"
method: GET
path: "/api/x/quote"
---

# How many X credits one post (or a whole thread) would use, before it is published or scheduled

`GET /api/x/quote`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/x/quote`
- Auth: HTTP bearer

## Query parameters

- `text` string
- `images` integer
- `video` boolean
- `thread` string[]
- `reply` string

## Response `200`

{ credits, has_link, images, video, sentence } — e.g. sentence "This post uses 10 X credits: it contains a link." With thread or reply, the whole chain: also x_posts, with_link and posts: [{ n, role: main|thread|reply, credits, has_link }] — e.g. "This thread uses 13 X credits: 4 X posts, 1 with a link."

## Other responses

- `400`: bad_x_thread: a post of the thread or the reply is empty, not text or over 280 characters as X counts them, or there are more than 25.

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
