Version 1.0 · Effective 29/08/2026 · The Vietnamese text is the binding version; this English text is a reference translation
This document supplements the Terms of Service and covers programmatic access specifically. Where they differ, the Terms of Service is the governing text.
TexAPI exposes wire formats compatible with three widely used industry standards, so that you can reuse the libraries and tools you already have:
| Path | Compatible with | Streaming |
|---|---|---|
POST /v1/chat/completions | OpenAI Chat Completions | Yes |
POST /v1/responses | OpenAI Responses | Yes |
POST /v1/messages | Anthropic Messages | Yes |
POST /v1/images/generations | OpenAI Images (with /v1/images/edits) | No |
GET /v1/models | OpenAI Models | — |
POST /v1beta/models/{model}:generateContent | Google Gemini | — |
POST /v1beta/models/{model}:streamGenerateContent | Google Gemini | Yes |
POST /v1beta/models/{model}:countTokens | Google Gemini | — |
Compatibility is not affiliation. That TexAPI accepts the same shape of data as OpenAI, Anthropic or Google does not mean TexAPI is those companies, is authorised by them, or is affiliated with them.
Format conversion. If the model you chose does not support the format you sent, TexAPI converts it. Conversion is lossy in some cases — not every field in one format has an equivalent in another. Specifically, for a converted Anthropic request your system prompt may be moved to the start of the first user message; the instruction still reaches the model, but its position changes and that can affect the result. If you need a format’s exact behaviour, choose a model that supports that format natively.
The catalogue is dynamic — synchronised automatically from the infrastructure supplier roughly every 30 minutes. Which means: new models can appear; models can be withdrawn or switched off with no advance notice to TexAPI; and prices can change.
Always take the current list from GET /v1/models or GET /api/models, and do not hard-code a model list into your application. If you need a specific model guaranteed available, that is a separate agreement — contact support.
TexAPI does not commit that a specific model will exist in future, and does not commit that a model’s behaviour will not change. Both are outside TexAPI’s control.
Use an API key of the form sk-texapi-…, sent in the Authorization: Bearer … or x-api-key: … header.
A third way is accepted but not recommended: the query parameter ?key=…, which exists for compatibility with some Gemini REST clients.
Rules about keys:
TexAPI may revoke a key without notice when: the organisation is suspended, a key is found to be exposed, or there is evidence of abuse.
| Plan | Requests/min | Tokens/min | API keys |
|---|---|---|---|
| Pay as you go | 60 | 100,000 | 2 |
| Starter | 200 | 500,000 | 5 |
| Builder | 400 | 1,500,000 | 15 |
| Pro | 800 | 3,000,000 | 50 |
| Team | 1,500 | 6,000,000 | no practical limit |
How the limits work, precisely:
You must not work around a limit by: creating several organisations, creating several accounts, spreading traffic across several keys to multiply the limit, or using proxies to distribute it.
You set your own calendar-month spend cap for each API key. This is the most important damage-limiting tool you have, and TexAPI recommends using it.
One request has four kinds of token at four different rates:
| Kind | What it is | Rate |
|---|---|---|
| Input | what you sent | the base rate |
| Output | what the model generated | usually 5–6× the input rate |
| Cache read | input remembered from an earlier call and read back | usually 10% of the input rate |
| Cache write | the first call, which writes that input into the cache | 1.25× the input rate |
The token counts are reported by the infrastructure supplier, not counted by TexAPI. TexAPI charges using exactly those numbers. When the infrastructure does not report them — typically when a stream is cut off mid-way — TexAPI reconstructs them by the rules published in Balance and Billing section 5, and every request has a pricing receipt stating which basis it used.
Rounding: to the micro-dollar ($0.000001), rounded up. Each request can be rounded up by at most one micro-dollar.
stream: true, or use :streamGenerateContent with the Gemini format.stream: true.The most important thing about streaming, stated plainly: if a stream is cut off part-way after the model has generated part of an answer, the part that reached you is charged — including where the cause was a timeout on the infrastructure side, and including where you disconnected.
The reason: the model did the work and TexAPI has paid for that work. The limit that protects you: the amount charged in this case does not exceed the sum held when the request began. If no part reached you, you are not charged.
| Item | Behaviour |
|---|---|
| Timeout on a normal call | configured by default at 120 seconds per route |
| Timeout on a stream | measured from the gap between two chunks and reset after each one — so a long answer is not cut off unfairly |
| Timeout on image generation/editing | considerably longer |
| Failover on error | Yes — TexAPI switches to another supply route for the same model |
| Cases where failover does happen | HTTP 429 from the infrastructure, any 5xx, an empty stream, a connection error before any response |
| Cases where failover does not happen | a timeout (because generation may already be running on the infrastructure side — calling again would be paying twice), and every other 4xx |
Failover is transparent to you: you do not know, and do not need to know, which route served a request.
Your obligation on retries: use increasing backoff. Do not retry immediately in a tight loop — that is classed as abuse under the Acceptable Use Policy, and on a timed-out request it can make you pay twice for the same work.
On models that support it, input repeated between calls can be remembered, and from the next call is charged at roughly 10% of the input rate. The mechanism is decided by the infrastructure and the model vendor, not by TexAPI.
Consequently: TexAPI does not commit that a particular piece of input will be remembered, does not commit to how long it stays cached, and does not commit to how much you will save. The actual cache read/write token counts appear in each request’s pricing receipt.
TexAPI has no response cache of its own. The same question sent twice is sent to the infrastructure twice and charged twice.
Repeated here because it is the most easily misunderstood point:
| Kind of change | Notice given |
|---|---|
| Adding a field, an endpoint or a model (backwards compatible) | none needed |
| A breaking change on an existing endpoint | 90 days |
| Discontinuing an endpoint | 90 days |
| Removing a model because the infrastructure stopped offering it | as soon as TexAPI knows — possibly with no advance notice, since it is outside our control |
| Changing a plan's limits (downwards) | 30 days |
| Changing prices | see Balance and Billing, section 7 |
| Emergency security work | immediately, possibly after the fact |
Changes are announced through in-product announcements and by email to the account address.
A summary; the full version is in the Acceptable Use Policy.
Do not send through TexAPI: content intended for unlawful purposes; content that harms children; instructions for making weapons or dangerous substances; malware; content intended for fraud, deception or impersonating someone; content that infringes intellectual property; or another person’s personal data that you have no legal basis to process.
Do not send through TexAPI, for data-protection reasons rather than because it is forbidden: sensitive personal data, health data, biometric data, payment account details, or data you are legally obliged not to transfer abroad.
If your application shows AI output to end users, you must tell them it is AI-generated.
Output a model generates can be wrong, incomplete, out of date or misleading, even when stated with great confidence. That is a property of the technology, not a defect in TexAPI or in any particular model.
Your obligation: do not use output as the sole basis for a decision affecting a person’s rights, health, finances, employment, housing, education or legal status without a qualified person reviewing it first. In these domains the infrastructure supplier’s terms require human review and require the use of AI to be disclosed at the start of each session. That obligation flows down to you through the Terms of Service.
The OpenAPI specification: GET /openapi.json, GET /openapi.yaml. The specification is technical documentation, not a contractual commitment; where they differ, this document and the Terms of Service are the governing texts.