API Reference
API Reference
Tough Tongue AI REST API
POST
- Base URL:
https://api.toughtongueai.com/api/public - Download OpenAPI Specification
Authentication
All requests require Bearer token authentication. Get your API token from the Developer PortalEnter
check to testEndpoints
Scenarios
| Method | Endpoint | Description |
|---|---|---|
| GET | /scenarios | List all scenarios |
| POST | /scenarios | Create scenario |
| GET | /scenarios/{id} | Get scenario |
| PATCH | /scenarios/{id} | Update scenario |
| DELETE | /scenarios/{id} | Delete scenario |
| GET | /featured-scenarios | List featured (public) |
Sessions
| Method | Endpoint | Description |
|---|---|---|
| GET | /sessions | List sessions |
| GET | /sessions/{id} | Get session details |
| POST | /sessions/analyze | Trigger analysis |
| POST | /v2/sessions | Create session |
Miscellaneous Utilities
| Method | Endpoint | Description |
|---|---|---|
| POST | /test | Test API token |
| GET | /balance | Check wallet balance |
Errors
In case of an error from any of the API endpoints, the response will containerror and details fields.
It shall also be accompanied with appropriate HTTP status codes.
| Code | Meaning |
|---|---|
| 400 | Bad request |
| 401 | Invalid token |
| 403 | Forbidden |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |