---
title: "Analyze writing style from recent tweets"
method: POST
path: "/styles"
tags: ["Composition"]
---

# Analyze writing style from recent tweets

`POST /styles`

## Request body

- object
  - `username` string, required — X username to analyze

## Response `200`

Fresh cached style profile returned

- StyleProfile — Full style profile with sampled tweets used for tone analysis.
  - `xUsername` string, required
  - `tweetCount` integer, required
  - `isOwnAccount` boolean, required
  - `fetchedAt` string, date-time, required
  - `tweets` object[], required
    - `id` string, required
    - `text` string, required
    - `createdAt` string
    - `authorUsername` string

## Other responses

- `201` — Style profile created or refreshed
- `400` — Invalid input
- `401` — Unauthenticated
- `402` — Payment required. Fixed-price direct MPP requests return a Machine Payments Protocol problem document and a WWW-Authenticate challenge. Authenticated X data requests return balances and explicit Stripe checkout-creation actions. Guest paid-read keys receive only the accountless guest top-up action. Direct MPP challenges also advertise the Stripe wallet action. Other authenticated endpoints return a legacy error shape. A failed request never creates checkout. Create checkout only after the user confirms a payment option.
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

## Changes

- **2026-07-22** `37e31f0b5439` — 1 breaking, 256 warning
  - added `#/components/schemas/XWritePaymentRequired` to the response body `oneOf` list for the response status `402` (media type: application/json)
  - added the new `body_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `body_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `body_too_large` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - …253 more
  - …this revision’s changelog is incomplete
- **2026-07-13** `83005363f122` — 7 breaking, 53 info
  - added `#/components/schemas/AuthenticatedPaymentRequired, #/components/schemas/GuestPaymentRequired, subschema #3` to the response body `oneOf` list for the response status `402`
  - the response's body type/format changed from `object`/`` to ``/`` for status `402`
  - added `subschema #1: LegacyErrorCode, subschema #2: StructuredError` to the `error` response property `oneOf` list for the response status `400`
  - added `subschema #1: LegacyErrorCode, subschema #2: StructuredError` to the `error` response property `oneOf` list for the response status `401`
  - …56 more
- …earlier changes not shown

[Full history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/styles/post.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api/revisions/37e31f0b5439/schema)
