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

# Analyze writing style from recent tweets

`POST /api/v1/styles`

Analyze writing style from recent tweets.

## 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.
- `default` — Unexpected error.

---

[API](https://skmtc.net/xquik-dev/apis/xquik-api-2.md) · [All operations](https://skmtc.net/xquik-dev/apis/xquik-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api-2/versions/c367e6e8f845/schema)
