Tianshu · AI Gateway
A gateway for applications sharing multiple models: OpenAI-compatible access, model allowlists, developer tokens, quota pre-deduction and hard stops, call records, and request_id reconciliation—with private deployment.
Product value
Core capabilities

- Common endpoints for chat, image generation/editing, async video tasks, and model listing
- Model allowlists and capability switches so you expose only what each app needs
- Apps change base_url and token instead of rebuilding vendor-specific adapters

- Multiple upstream channels with model mapping, enable/disable, and staged rollout
- Deterministic errors on failure so apps can retry or degrade gracefully
- Vendor differences stay in the adapter layer, not in every business app

- Issue, disable, and scope developer tokens and API keys
- Upstream vendor keys are stored only in the gateway
- Per-app or per-team credentials for isolation and revocation

- Quota accounts, pre-deduction, and overage rejection before spend runs away
- Settlement is separated from payment: quotas and ledgers, not a checkout
- Quota changes and consumption records are visible for admin review

- Every call returns a request_id; upstream_request_id is recorded when available
- Usage aggregates by key, model, and time for your own ledger
- Failed items can be filtered and checked line by line against business records

- Call logs, latency, status codes, and exception analysis for slow or failing requests
- Upstream health and model availability monitoring with alerts and escalation
- Private deployment, backup, and upgrades per the delivery handbook
Product traits
One entry point | Many models, one contract
Apps stop integrating each vendor separately; models and channels are managed centrally.
Protocol compatible | Minimal app changes
OpenAI-compatible endpoints reduce integration and migration effort.
Key custody | Credentials contained
Vendor keys stay in the gateway; apps use developer tokens.
Unified access & governance
Keys · quotas · metering · audit
Quota control | Pre-deduct & hard stop
Boundaries come first, with deterministic overage rejection.
Reconcilable ledger | Every call accounted for
request_id links gateway and business records for line-by-line checks.
Who it is for
Adoption path
- 01
Model inventory
Map scenarios, models, and upstreams; agree on allowlists, priorities, and availability.
- 02
Integration pilot
Connect one or two apps to the OpenAI-compatible endpoint and validate errors and timeouts.
- 03
Quotas & reconciliation
Configure quotas, pre-deduction, and hard stops; connect request_id reconciliation and failed-item review.
- 04
Rollout & operations
Expand apps and models; establish logging, alerts, backup, and upgrade routines.
Technical notes
OpenAI-compatible endpoints
Chat completions, image generation/editing, async video task queries, and model listing; the exposed set follows deployment configuration.
Upstream channels
Configure endpoint and credentials per channel; maintain model mapping, enablement, and allowlists. Credentials stay in the gateway.
Metering & reconciliation
Quota pre-deduction, hard stops, and call records; responses carry request_id for business ledgers and reconciliation.
Deployment & operations
Private or on-premises deployment; console and API can be co-located or separated. Backup, upgrade, and health checks follow the delivery handbook.
Frequently asked questions
How is this different from calling vendors directly?
Tianshu provides one entry point, key custody, quotas, and call records. Apps do not hold upstream keys, and model or channel changes are handled at the gateway with a shared basis for diagnosis and reconciliation.
How much code changes?
Most OpenAI-compatible apps only change base_url and token; image and async video capabilities may need endpoint-specific adaptation. The exact effort depends on the current integration.
Which models are supported?
The deployment's model allowlist defines the set, covering text, image, and async video capabilities as configured. Upstream availability is confirmed before integration.
How are quotas controlled?
Quota accounts, pre-deduction, and hard stops; overage returns a deterministic error that apps can map to a readable message. Adjustments and consumption are visible.
What do logs show?
Call time, model, key, status, latency, and request_id; upstream_request_id is recorded when available for line-by-line reconciliation.
Can it be deployed privately?
Yes. Server, network, and high-availability details are assessed per project. Keys and call data remain in your environment.
Where do upstream keys live?
Vendor keys live only in Tianshu; downstream systems such as Kaiwu hold a developer token, not raw vendor keys.
How do we troubleshoot failures?
Start with the gateway's deterministic error and call log, then reconcile by request_id and check upstream health and channel configuration.
AI+ product foundation
Every product shares one AI foundation
This is not a chat box added to traditional software. Models, knowledge, workflows, and human confirmation are built into the system foundation. Each product applies AI to its own domain, with shared access, governance, and audit.
Four layers
Models & compute
Tianshu provides unified multi-model access, task routing, quotas, and call logs; business systems never hold vendor keys directly.
Knowledge & data
Business data, documents, rules, and metrics enter a searchable, citable knowledge layer.
AI workflows
Generation, judgment, recommendations, and write-backs are orchestrated into business processes, with human gates at key steps.
Evaluation & audit
Prompts, models, outputs, confirmations, and business outcomes are retained for replay, evaluation, and accountability.
AI+ architecture
- Business data
- Knowledge & context
- Models / agents
- Human confirmation
- Business action & write-back
AI capabilities in this product
Model routing & fallback
Choose models and channels by task, cost, and availability; retry or fall back on failure.
Usage & cost insight
Analyze consumption by app, key, and model to find abnormal calls and budget risk.
Call anomaly analysis
Aggregate error codes, latency, and upstream health to shorten diagnosis.
Operating principles
AI recommends, people decide
Amounts, contracts, publishing, awards, and account adjustments go through human confirmation by default.
Explainable and reversible
Citations, model versions, and execution results are retained, with rollback for exceptions.
Private by default
Models are accessed through Tianshu; data and assets stay in the school or enterprise environment by default.
Related solutions, services, and insights
Related solutions
Next step
Need a demo, integration assessment, or delivery plan? Our commercial and architecture teams respond on business days.