> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What Are APIYI's Security Red Lines?

> Never hand server credentials, SSH keys, or cloud AK/SK to any AI relay or aggregator — including APIYI itself. Using AI for distillation or security attacks leads to account suspension and termination.

## Short Answer

Two security red lines apply to every APIYI user, across all models, groups, and calling methods:

1. **Security credentials never pass through any relay.** Server credentials, SSH private keys, database passwords, cloud AK/SK, and production API keys must not be pasted into AI chats, or stored, rotated, or distributed through a relay or aggregator. **This applies to APIYI itself as well.**
2. **Never use AI to harm others' security.** Model distillation against someone else's model, unauthorized scanning, brute forcing, exploitation, credential stuffing, DDoS, phishing, and similar behavior: once verified, APIYI reserves the right to suspend the account, refund the remaining balance, and terminate service. Suspected criminal activity will be handled in cooperation with the authorities as required by law.

## Red Line 1: Keep Security Credentials Out of Any Relay

### What counts as a security credential

| Category | Typical content |
| - | - |
| Server credentials | SSH private keys, root / admin passwords, bastion host accounts |
| Databases | Connection strings, database usernames and passwords, backup encryption keys |
| Cloud providers | AccessKey ID / Secret, console login credentials, sub-account keys |
| Application config | Production API keys, `.env` contents, signing keys, OAuth client secrets |
| Other | Payment keys, certificate private keys, email and application passwords |

If leaking it would let someone log in to your systems, read your data, or run up charges, treat it as a security credential.

### Why credentials and relays do not mix

The risk is not just that a model might remember the secret:

> [card] Longer chain
>
> A request travels from your computer through client tools, API relays, and the model provider. Every hop is another forwarding point and another potential leak surface.

> [card] More copies
>
> Session history, tool snapshots, request logs, and error reports can all keep copies — often in plain text.

> [card] Hard to trace
>
> When something goes wrong, it is difficult to prove which hop leaked the credential. Responsibility and dispute resolution become far more complicated.

> [card] Excessive scope
>
> A server credential is usually not one application's key — it is control over an entire machine or account. The downside is much larger than a normal API key.

> [!WARNING]
>
> **This applies to APIYI too.** APIYI is itself a relay service. We recommend that you do not give server credentials to any relay or aggregator, including us. Using AI to write code, read errors, or draft operational commands is fine; the red line is **letting the credentials themselves enter a chat or pass through a relay**.

### What to do instead

**1. Keep credentials on your own machine**

Store them in environment variables, the system keychain, or a secrets manager. Do not put them in code, documents, or chat.

**2. Give AI only redacted content**

When you need AI to help troubleshoot, replace passwords, tokens, and private keys with `***` or placeholders. Keep only the error message and structure you actually need.

**3. Use temporary credentials when AI must touch them**

Create a dedicated credential with minimum permissions and a short lifetime, then revoke it immediately after the task. Never use a production master credential.

**4. Operate servers through proper channels**

Use SSH, a bastion host, or the cloud console so audit records are kept. Do not let AI or a relay service hold and operate your keys on your behalf.

### A simple test

```text theme={null}
❌ The root password is xxx and the private key is below — log in and take a look
❌ Here is our .env — figure out why the database connection fails
✅ The error is Access denied for user 'app'@'10.0.0.5' — give me a few read-only diagnostic commands
✅ Write a deployment script that reads the secret from an environment variable, with no real values
```

> [!TIP]
>
> There is only one test: **would this content cause damage if a stranger saw it?** If yes, do not send it to any AI or any relay service.

## Red Line 2: Never Use AI to Attack Others

### Prohibited uses

> [!WARNING]
>
> The following are not normal use. APIYI treats them as serious violations:

* **Model distillation and bulk extraction**: sending bulk requests to another party's model or service to replicate, replace, or resell its capabilities, including training a competing model or reselling the data. This also covers using multiple accounts or rotation to bypass rate or quota limits.
* **Unauthorized security testing and attacks**: port scanning, password brute forcing, credential stuffing, exploitation, DDoS, phishing, malware generation, or evasion work against targets you do not have explicit authorization to test.
* **Data and privacy violations**: dumping databases, scraping non-public data, bypassing access controls, or stealing and trading credentials.
* **Other unlawful uses**: any use that violates the laws of your jurisdiction, the target service's terms, or APIYI's usage policies.

### Normal evaluation and authorized security testing are fine

* **Small-scale, normal comparison testing**, academic research, or product selection against public models is not distillation.
* Security testing against systems **you own or have explicit written authorization to test** is allowed. Keep the authorization on file and comply with local law.
* The key question is **purpose and authorization**: are you replicating, attacking, or reselling — or evaluating, defending, and improving your own systems?

### How we detect and handle violations

APIYI verifies reports using call-behavior risk controls, content moderation, provider notifications, and user reports. Once a violation is confirmed, APIYI reserves the following rights:

> [!WARNING]
>
> * The account and related tokens are suspended immediately, and service is stopped
> * The remaining account balance is refunded, the partnership is terminated, and the account is cleared out
> * For suspected criminal activity, necessary evidence is preserved and the matter is handled with the authorities as required by law

> [!NOTE]
>
> Security and compliance are our baseline, not a cost item open to negotiation. For the vast majority of legitimate users, these rules do not affect daily use at all. They target behavior that treats the platform as an attack tool or a data-extraction channel.

## FAQ

> [accordion] Can I still use APIYI for personal coding and server maintenance?
>
> Yes. The red line is not a ban on using AI to write code or troubleshoot servers. It is **do not give server passwords, private keys, or other security credentials to AI or any relay service**. Everyday code generation, error analysis, and command explanations are fine; redact credentials first when they are involved.

> [accordion] Is it a violation to have AI help me edit server configuration?
>
> No. Having AI generate configuration templates, explain parameters, or suggest diagnostic commands is fine. What you should not do is paste the root password, SSH private key, database password, and full configuration together, or treat a relay service as a key vault.

> [accordion] Will model comparison testing be treated as distillation?
>
> Normal small-scale comparison testing, academic research, and model selection are fine. What is prohibited is **bulk extraction aimed at replicating, replacing, or reselling another party's model capabilities**, especially multi-account collection that bypasses rate or quota limits. Purpose, scale, and authorization are what matter.

> [accordion] Can I still do security research or penetration testing?
>
> Only against systems you own or have **explicit written authorization** to test, and in compliance with local law. Unauthorized scanning, brute forcing, credential stuffing, and exploitation are prohibited. Keep your authorization documents so you can explain the purpose if asked.

> [accordion] What if I am flagged by mistake?
>
> Contact support to appeal, explain the specific use case, and provide the necessary materials. If the flag was a mistake, we will restore the account and related services. An appeal does not affect your normal use of other platform features.

> [accordion] What happens to my balance if I am terminated for a violation?
>
> In a violation termination, the remaining account balance is refunded and service is terminated. Unsettled bills, third-party claims, or legal proceedings are handled under the applicable rules and law.

## Related Documentation

> [card] [Manage API Keys Securely](https://docs.apiyi.com/en/faq/key-security-management.md)
>
> Token permissions, spending limits, and daily leak-prevention habits.

> [card] [Platform Data Security](https://docs.apiyi.com/en/faq/data-security.md)
>
> APIYI's encrypted transport, minimal storage, and access controls.

> [card] [Content Safety Policy](https://docs.apiyi.com/en/faq/content-safety.md)
>
> Moderation mechanisms and violation handling.

> [card] [Investigate Unexpected KEY Usage](https://docs.apiyi.com/en/faq/troubleshoot-key-usage.md)
>
> Trace a leak through logs and stop the damage.

## Contact Us

> [card] Security Incidents and Appeals
>
> **WeChat customer service**: [Contact us](https://work.weixin.qq.com/kfid/kfc9adfd5810ece25ec)
>
> **Email**: [hi@apiyi.com](mailto:hi@apiyi.com)
>
> **Reach out to**
>
> * Report a suspected key leak or unexpected call
> * Ask whether a particular use case is compliant
> * Submit an appeal for a mistaken flag


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.