XiuAI Anti-Distillation Terms (Claude API)
The XiuAI Anti-Distillation Terms are XiuAI’s usage rules for the Claude API. They keep models from being used for distillation or capability replication and protect capacity for everyday development. Ordinary development and Q&A do not reach the scoring thresholds.
Published by XiuAI · Version 1.1 · Updated November 23, 2026
Key points
- Prohibited: using Claude output to train, fine-tune or distill models, building training or evaluation datasets, inducing the model to reveal its chain of thought, or harvesting answers and scores with fixed templates.
- Blocking and scoring: a request matching a distillation template returns HTTP 400 before forwarding, with no upstream call and no charge. Template matches and provider refusals earn points by category, and only Claude requests are scored.
- Suspension: reaching a threshold within 1 minute, 5 minutes, 1 hour or 1 day triggers an automatic suspension, 5 minutes the first time, longer each time and permanent from the fifth violation within 30 days. A suspended account gets HTTP 403 for every model request on all of its API keys, with no charge.
- Multi-user platforms: set X-Xiu-Sub-User on every request from your server so scoring and suspensions apply to that sub-user instead of the whole account.
- Appeals: to dispute a score or appeal a permanent suspension, email your account, the time and the request ID to contact@xiu.ai.
Full terms
These terms form part of the XiuAI Terms of Service and apply to every user and request that calls a Claude model through XiuAI.
Article 1. Purpose and scope
XiuAI adopts these terms to keep the service stable and fair and to prevent models from being used for distillation or capability replication. They cover every user and request that calls a Claude model through XiuAI and form part of the XiuAI Terms of Service. Using the service constitutes acceptance of these terms.
Article 2. Prohibited uses
You may not use the service for any of the following. A single request may not reveal its purpose, so XiuAI considers patterns across requests. For example, asking Claude to explain a code change is an ordinary development task. Using its answers, scores or demonstrations as training material to teach those abilities to another model falls under this article.
- Using model outputs to train, fine-tune, distill, or improve any machine learning model.
- Systematically collecting, scraping, or storing model outputs to build training, distillation, or evaluation datasets.
- Inducing the model to reveal its reasoning or chain of thought, including asking it to write its thinking into specified tags, sections, or formats.
- Submitting questions with fixed templates at scale, harvesting answers in bulk, or collecting comparisons and scores to train reward models or replicate model capabilities.
- Attempting to reconstruct model weights, parameters, architecture, or system prompts.
Article 3. Template detection and blocking
XiuAI maintains distillation template detection rules and updates them as needed. Each request is checked before it is sent to the model provider, and only the system prompt and final user message are checked. A request identified as a distillation template is rejected with HTTP 400 (invalid_request_error). It is not sent to the provider and incurs no charge. Every match counts toward refusal scoring (see Article 4). The detection rules are not published.
Invalid parameters can also return HTTP 400, so check the error details before attributing points to a request.
Article 4. Refusal scoring
When the model provider refuses a request (stop_reason: refusal) or Article 3 blocks it, XiuAI adds points for the caller as shown below. Provider refusals are scored by stop_details.category, with 1 point for an unspecified category. A network error, timeout or invalid parameter alone is not a refusal. The weights reflect how closely each behavior relates to distillation. The bio and cyber weights are lower because legitimate research and development can trigger them.
Each request is scored at most once. Internal gateway retries and refusals that arrive mid-stream are scored once, based on the final result of that request. If a request sets fallbacks and a fallback model completes the answer, it earns no points. If it still ends in a refusal after the fallback, it is scored once.
An upstream refusal can incur a charge depending on its category and whether output had started. With fallbacks, the refusal that triggered the fallback can also be billed. XiuAI charges for the usage the provider actually records. With direct access, look up the request ID in your usage records. If you use a third-party service, ask it to help check the charge.
A caller under this article depends on whether the request carries a valid sub-user header (see Article 5). With the header, the caller is the account and sub-user ID pair. Without it, the caller is the account, whichever of its API keys sent the request. For example, if a platform labels Alice and Bob separately, Alice’s refusals accrue only to Alice. If the platform sends no header, both users’ refusals accrue to the account.
| Category | Points per event |
|---|---|
| Template match (blocked under Article 3) | 5 |
| reasoning_extraction (extracting reasoning) | 5 |
| frontier_llm (frontier model development) | 3 |
| bio (high-risk biological content) | 1 |
| cyber (high-risk cybersecurity content) | 1 |
| Other or unspecified refusal | 1 |
Article 5. Sub-user identification
If one account serves several sub-users, such as a third-party platform, a downstream service or a shared team account, you can identify the sub-user on each request. Scoring and suspensions then apply only to the sub-user who sent the request, and other sub-users on the same account are unaffected. Without the header, the whole account is scored and suspended as one caller. Developers who use their account only for themselves do not need it.
| Item | Requirement |
|---|---|
| Header | X-Xiu-Sub-User: <ID> |
| Format | Letters, digits and _ . : -, 1–128 characters (^[A-Za-z0-9_.:-]{1,128}$) |
| Value | Your platform’s internal user ID or a hash of it. It must be stable and must not contain personal information such as an email address or phone number |
| Endpoints | Every Claude endpoint, including Anthropic Messages and OpenAI-compatible endpoints |
| Invalid value | Treated as absent. The request proceeds without an error, and the response header X-Xiu-Sub-User: ignored flags it |
| Valid value | Response header X-Xiu-Sub-User: accepted |
- Your platform’s server must set this header on every request and overwrite any value supplied by the client. Passing a client value through lets sub-users impersonate others or rotate IDs to evade suspensions, and the platform bears the consequences (see Article 6, paragraph 3).
- IDs are case-sensitive, matched exactly and scoped to the account. The same ID sent with different API keys on one account is the same sub-user, and the same ID on different accounts is unrelated. A new ID counts as a new sub-user, but changing IDs does not evade Article 6, paragraph 3.
- The XiuAI gateway removes this header. It is never sent to the model provider, and its value is never echoed in a response.
- XiuAI does not identify sub-users from request body fields such as metadata.user_id or user. These fields are protocol metadata, not sub-user identifiers.
Article 6. Violation thresholds
XiuAI adds up each caller’s points over the windows below. Reaching the threshold in any window counts as one violation. The windows are rolling: each time points are added, XiuAI looks back over the previous minute, 5 minutes, hour and day. The thresholds are set against normal use, and ordinary development and Q&A do not reach them. For example, four 5-point events from the same caller within any 60 seconds reach 20 points and count as one violation.
Account total limit: XiuAI also adds up points across all requests on each account, whichever API key sent them, with or without a sub-user header and whatever the ID. Reaching the total limit in any window counts as one violation for that account. The total limit is five times the caller threshold, leaving room for platforms with many sub-users. XiuAI may adjust it for an individual account after review. Rotating IDs or replacing or creating API keys does not evade this paragraph.
Each event is assessed for the sub-user first and then for the account. Both can be found in violation at the same time.
| Window | Caller threshold | Account total limit |
|---|---|---|
| 1 minute | 20 points | 100 points |
| 5 minutes | 30 points | 150 points |
| 1 hour | 50 points | 250 points |
| 1 day | 100 points | 500 points |
Article 7. Suspension and reinstatement
After a violation, XiuAI automatically suspends the caller. The suspension length increases with the number of violations within 30 days.
| Violations within 30 days | Suspension | Reinstatement |
|---|---|---|
| First | 5 minutes | Automatic |
| Second | 1 hour | Automatic |
| Third | 1 day | Automatic |
| Fourth | 3 days | Automatic |
| Fifth and subsequent | Permanent | Manual, after appeal |
- Scope: a suspended sub-user loses access only for requests carrying that ID on that account. A suspended account, including after a violation without a sub-user header or under the total limit in Article 6, paragraph 3, loses access for every request on all of its API keys, including keys created during the suspension, with or without a sub-user header.
- Violation counts are kept per caller. A sub-user’s violations do not count toward its account. Violations without a sub-user header and total-limit violations are combined in the account’s count and follow the table above.
- During a suspension, requests return HTTP 403 (permission_error). They are not sent to the model provider and incur no charge. Response headers give the scope and reinstatement time: X-Xiu-Ban-Scope: sub_user | account and X-Xiu-Ban-Until: <RFC 3339 time> | permanent.
- No points accrue during a suspension. Scoring starts again after reinstatement. The violation count resets after 30 consecutive days without a violation.
Only Claude requests accrue points, but a suspension covers requests to every model. For example, while an account is suspended after Claude refusals, none of its API keys can call any model, including GLM.
Suspensions do not use HTTP 429 or a Retry-After header. Official SDKs automatically retry a 429 according to Retry-After but do not retry a 403, which avoids pointless retries during a suspension. Read X-Xiu-Ban-Until and resume after that time. OpenAI-compatible endpoints use that protocol’s error format with the same status code and headers.
Article 8. Appeals
To appeal a permanent suspension, email your account, the time of the incident and the request ID to the address below. If a sub-user is permanently suspended, the account owner appeals on its behalf and includes the sub-user ID. There is no need to send the API key secret or the full conversation.
XiuAI will review the related refusal records. If the decision was made in error, XiuAI immediately lifts the suspension and resets the violation count. If a use prohibited by Article 2 is confirmed, the suspension stands and the account balance will not be refunded.
The no-refund provision applies only when an account is permanently suspended and a use prohibited by Article 2 is confirmed. A sub-user suspension does not affect the account’s other requests or its balance. Rights that cannot be excluded by law are unaffected.
Temporary suspensions end automatically and need no appeal. If you believe points were added in error, send the request ID. If XiuAI confirms the error, it corrects the points and the violation count.
Article 9. Data handling
XiuAI does not use user requests or model outputs to train any model.
To detect distillation, for requests classified as reasoning extraction XiuAI retains the first 2,000 characters of the system prompt and of the final user message for no more than 7 days. They are used only for safety review and detection-rule updates and are then automatically deleted.
Refusal records (time, category, model, API key and sub-user ID) are kept for 30 days for scoring, monitoring and appeal review. They contain no request text.
Article 10. Developer guidance
To avoid false positives, we recommend that you:
- Use the provider’s thinking parameter when you need reasoning, and do not ask the model to output its thinking in a particular format. You can still ask for evidence or a short explanation of a result.
- Avoid submitting batches of requests from the same template.
- After a refusal, revise the request before resubmitting it instead of retrying it unchanged.
- If one account serves several sub-users, send the sub-user header on every request (Article 5) so that one user’s behavior does not affect everyone. When you receive X-Xiu-Ban-Scope: sub_user, deal with that user on your platform.
Article 11. Changes to these terms
XiuAI may revise these terms as provider policies change, including point weights, thresholds and suspension durations. Revised terms take effect on publication, and the notice gives the exact effective time. Earlier requests and settled usage are not subject to the revised terms.
Appendix. Sub-user header example
This example sends an Anthropic Messages request for sub-user member-20931.
curl https://router-api.xiu.ai/v1/messages \
-H "x-api-key: $XIUAI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "X-Xiu-Sub-User: member-20931" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'With an SDK, set the header for each sub-user on your server. The Anthropic and OpenAI TypeScript SDKs use defaultHeaders and the Python SDKs use default_headers. You can also pass it per request with the headers option in TypeScript or extra_headers in Python. Never set it in a browser or client app.
Version and citation
The XiuAI Anti-Distillation Terms is published and maintained by XiuAI. It is not an Anthropic document. Each revision changes the version number and is listed below and in XiuAI announcements.
When citing it, give the name and version, such as “XiuAI Anti-Distillation Terms 1.1”, and link to this page. Other Claude API providers may refer to or adopt these rules. Please credit the source when you adopt them.
| Item | Details |
|---|---|
| Name | XiuAI Anti-Distillation Terms (Claude API) |
| Published by | XiuAI |
| Current version | 1.1, updated November 23, 2026 |
| First published | November 23, 2026 |
| Permanent link | https://xiu.ai/claude/anti-distillation |
Revision history
- 1.1 (November 23, 2026): Suspensions and the total limit now apply per account, and sub-user IDs are scoped to the account.
- 1.0 (November 23, 2026): First published.