Environments
Base URLs (production, staging), rate limits, versioning.
The therappai API is designed to be predictable and easy to integrate. This page outlines the available environments, base URLs, versioning model, and any rate-limiting considerations so you can develop confidently.
Base URLs
Production
Use this environment for all live traffic:
https://api.therappai.com/api/v1This endpoint is optimized for performance, reliability, and user-facing workloads.
Staging (optional)
If your team sets up a staging or sandbox API, it would typically follow this structure:
https://staging.therappai.com/api/v1Note: Staging is not required for v1. If you do not have this environment set up yet, you may remove or comment it out.
API Versioning
therappai uses URL-based versioning, starting with:
/api/v1Why URL versioning?
Non-breaking changes can be shipped continuously
Breaking changes are isolated to new versions
Integrators always know which version they are targeting
When a future version ships, it will follow this pattern:
/api/v2Versioning ensures your integration remains stable over time.
Rate Limits
To protect platform stability, therappai may apply soft rate limits to some endpoints, especially those related to:
AI therapy message generation
Video avatar generation
Heavy content retrieval
Defaults (if nothing custom is set):
Standard API endpoints: high allowance
AI message endpoints: moderate allowance
Video endpoints: tighter allowance
Note: If your application expects high concurrency or enterprise-scale usage, reach out to us for custom limits.
Error Behavior Between Environments
Production and staging (if enabled) share consistent error formats:
400— validation issues401— authentication required or invalid token403— forbidden404— resource not found429— rate limit reached500— server error
This consistency ensures that development and testing behave predictably.
Environment Best Practices
Always store base URLs in environment variables (
ENV,.env, CI/CD secrets).Never hardcode tokens in your codebase or client-side JavaScript.
Test integrations in staging when available, especially session flows and multi-step interactions.
Lock your integration to a specific API version.
Last updated

