Skip to main content
Base URL: https://api.toughtongueai.com/api/public All requests require Bearer token authentication.

Authentication

Get your token from Developer Portal → API Keys.
Proxy API calls through your backend. Never expose tokens client-side.

Core Workflows

1. Create Scenario

Response:

2. Create Session

Response:

3. Analyze Session

Response:

Backend Proxy Example


Endpoint Reference

Scenarios

Sessions

Utilities


Error Codes

Error format:

Best Practices

  1. Cache scenarios — they rarely change
  2. Poll or use callbacks — check session completion via iframe events or polling
  3. Retry with backoff — handle transient failures
  4. Log errors — monitor API health
Next: API Reference →