Getting Started
This guide is for API consumers using a hosted PsychAI endpoint.
No local install needed
You do not need to install Python, databases, or run the API server. You only need:
- Your PsychAI API base URL
- Network access to that URL
- An HTTP client (
curl, Postman, or code)
1. Set your API base URL
Use your issued environment URL, for example:
export PSYCHAI_API_BASE_URL="https://api.your-psychai-domain.com"
2. Register a user
curl -X POST "$PSYCHAI_API_BASE_URL/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"name": "Jane Doe",
"password": "securePassword123",
"user_type": "developer",
"industry": "mental_health"
}'
3. Login and get tokens
curl -X POST "$PSYCHAI_API_BASE_URL/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securePassword123"
}'
Save access_token from the response.
4. Call analyze endpoint
curl -X POST "$PSYCHAI_API_BASE_URL/v1.0.0/analyze?mode=Full%20Output" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"input_text": "I am stressed about work, but I have been trying to pause and regulate my reactions."
}'
5. Validate response headers
Inspect these headers for quota tracking:
X-Requests-RemainingX-Reset-At
Input rules
input_textcannot be empty- max input length is 15,000 characters