Complete API endpoint documentation with cURL and Postman examples
Base URL: http://149.102.159.66:8000
Replace with your production URL in production environments.
/auth/loginAuth: None (Public)Authenticate a user and receive a JWT access token. The token should be stored and used for subsequent authenticated requests.
| Header | Value | Required |
|---|---|---|
| Content-Type | text/plain (TOON format) | Required |
| Accept | text/plain | Required |
| Field | Type | Required | Description |
|---|---|---|---|
| string | Required | User's email address | |
| password | string | Required | User's password |
Example:
email:"user@example.com"
password:"yourpassword123"curl -X POST "http://149.102.159.66:8000/auth/login" \
-H "Content-Type: text/plain" \
-H "Accept: text/plain" \
-d 'email:"user@example.com"
password:"yourpassword123"'| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | Content-Type | text/plain (TOON format) |
| ✓ | Accept | text/plain |
email:"user@example.com" password:"yourpassword123"
access_token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
token_type:"bearer"
user_type:"standard"
roles:["user"]/users/registerAuth: None (Public)Create a new user account. After registration, the user can login to receive an access token.
| Header | Value | Required |
|---|---|---|
| Content-Type | text/plain (TOON format) | Required |
| Accept | text/plain | Required |
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | User's first name |
| last_name | string | Required | User's last name |
| string | Required | User's email address | |
| password | string | Required | Password (min 8 characters) |
Example:
first_name:"John"
last_name:"Doe"
email:"john.doe@example.com"
password:"securepassword123"curl -X POST "http://149.102.159.66:8000/users/register" \
-H "Content-Type: text/plain" \
-H "Accept: text/plain" \
-d 'first_name:"John"
last_name:"Doe"
email:"john.doe@example.com"
password:"securepassword123"'| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | Content-Type | text/plain (TOON format) |
| ✓ | Accept | text/plain |
first_name:"John" last_name:"Doe" email:"john.doe@example.com" password:"securepassword123"
message:"User registered successfully"
user:{
id:"uuid-xxx-xxx"
email:"john.doe@example.com"
first_name:"John"
last_name:"Doe"
api_key:"ak_xxxxxxxxxxxxxx"
}/auth/logoutAuth: JWT Bearer TokenInvalidate the current user session. The JWT token will be blacklisted.
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_JWT_TOKEN | Required |
curl -X POST "http://149.102.159.66:8000/auth/logout" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | Authorization | Bearer YOUR_JWT_TOKEN |
message:"Logged out successfully"/users/profileAuth: JWT Bearer TokenRetrieve the current authenticated user's profile information including their API key.
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_JWT_TOKEN | Required |
| Content-Type | text/plain | Optional |
| Accept | text/plain | Optional |
curl -X GET "http://149.102.159.66:8000/users/profile" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Accept: text/plain"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | Authorization | Bearer YOUR_JWT_TOKEN |
| ✓ | Content-Type | text/plain |
| ✓ | Accept | text/plain |
id:"uuid-xxx-xxx"
email:"john.doe@example.com"
first_name:"John"
last_name:"Doe"
api_key:"ak_xxxxxxxxxxxxxxxxxxxxxx"
user_type:"standard"
roles:["user"]
created_at:"2025-01-20T10:30:00Z"Complete request and response guide for S3-based document ingestion.
https://your-api-domain/v1/documentsAll endpoints require API Key authentication via the X-API-Key header.
All responses are encoded in toon format and returned with Content-Type set to text/plain.
Submit a single document by S3 URL and specify the document type for downstream extraction.
POST /upload-documentAuth: X-API-KeyPOST /v1/documents/upload-document
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"s3_url": "https://bucket.s3.us-east-1.amazonaws.com/documents/invoice.pdf",
"document_type": "InvoicePDF"
}| Field | Description |
|---|---|
| s3_url (required) | Full S3 URL to the document. |
| document_type (required) | One of: ReceiptPDF, ReceiptImage, InvoicePDF, InvoiceImage. |
status: pending
request_id: req_abc123def456
filename: invoice.pdf
file_size: 245632
message: S3 document downloaded and queued for processing.
submitted_at: 2026-03-14T10:30:45.123456error: s3_url is requirederror: document_type is requirederror: Could not parse S3 URLerror: S3 download failed| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | application/json |
{
"s3_url": "https://bucket.s3.us-east-1.amazonaws.com/documents/invoice.pdf",
"document_type": "InvoicePDF"
}Queue a PDF bank statement directly from S3 for asynchronous processing.
POST /process-bank-statementAuth: X-API-KeyPOST /v1/documents/process-bank-statement
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"s3_url": "https://bucket.s3.us-east-1.amazonaws.com/statements/statement_2026_03.pdf"
}| Field | Description |
|---|---|
| s3_url (required) | Full S3 URL to a PDF bank statement file. |
| PDF validation | The URL must end with .pdf and point to an AWS S3 object. |
status: pending
request_id: req_xyz789abc123
filename: statement_2026_03.pdf
file_size: 512048
message: Bank statement from S3 downloaded and queued for processing.
submitted_at: 2026-03-14T11:15:30.654321error: s3_url is requirederror: S3 URL must point to a PDF fileerror: Could not parse S3 URLerror: S3 download failed| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | application/json |
{
"s3_url": "https://bucket.s3.us-east-1.amazonaws.com/statements/statement_2026_03.pdf"
}Process up to 50 S3 objects in one batch and return per-file outcomes in the results array.
POST /bulk-upload-filesAuth: X-API-KeyPOST /v1/documents/bulk-upload-files
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"s3_urls": [
"https://bucket.s3.us-east-1.amazonaws.com/invoices/inv_001.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/invoices/inv_002.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/receipts/receipt_001.jpg"
],
"document_type": "InvoicePDF"
}| Field | Description |
|---|---|
| s3_urls (required) | Array of S3 URLs. Maximum 50 files per request. |
| document_type (required) | One of: ReceiptPDF, ReceiptImage, InvoicePDF, InvoiceImage. Applied to all files in the batch. |
status: completed
total_files: 3
successful_uploads: 2
failed_uploads: 1
request_ids[0]: req_inv001_abc123
request_ids[1]: req_inv002_def456
results[0]:
filename: inv_001.pdf
request_id: req_inv001_abc123
status: pending
file_size: 128456
error_message: ""
results[1]:
filename: inv_002.pdf
request_id: req_inv002_def456
status: pending
file_size: 145230
error_message: ""
results[2]:
filename: receipt_001.jpg
request_id: req_receipt001_ghi789
status: failed
file_size: 0
error_message: S3 download failed
message: Processed 2 files successfully, 1 failed
submitted_at: 2026-03-14T12:00:15.987654error: s3_urls array is requirederror: document_type is requirederror: s3_urls array is requirederror: Maximum 50 files allowed per bulk upload| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | application/json |
{
"s3_urls": [
"https://bucket.s3.us-east-1.amazonaws.com/invoices/inv_001.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/invoices/inv_002.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/receipts/receipt_001.jpg"
],
"document_type": "InvoicePDF"
}Classify a batch of S3-backed files, optionally enriched with document metadata.
POST /v1/documents/unified-uploadAuth: X-API-KeyPOST /v1/documents/unified-upload
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"s3_urls": [
"https://bucket.s3.us-east-1.amazonaws.com/documents/doc1.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/documents/doc2.jpg"
]
}| Field | Description |
|---|---|
| s3_urls (required) | Array of S3 URLs. Maximum 10 files for unified classification. |
| document_type (optional) | Pre-specified document type. |
| document_id (optional) | Custom document identifier. |
| environment (optional) | Environment context. |
status: completed
results[0]:
filename: doc1.pdf
document_type: invoice
confidence: 0.9847
status: completed
results[1]:
filename: doc2.jpg
document_type: receipt
confidence: 0.8765
status: completed
total_files: 2
successful: 2
failed: 0
message: Classification completed
submitted_at: 2026-03-14T13:45:20.345678error: s3_urls list cannot be emptyerror: Maximum 10 files per batch. You provided: 15error: Invalid S3 URL format: https://invalid-url.com/file.pdf| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | application/json |
{
"s3_urls": [
"https://bucket.s3.us-east-1.amazonaws.com/documents/doc1.pdf",
"https://bucket.s3.us-east-1.amazonaws.com/documents/doc2.jpg"
]
}/v1/requests/{request_id}Auth: X-API-KeyPoll this endpoint to check the processing status of a document. Returns extracted data when processing is complete.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
curl -X GET "http://149.102.159.66:8000/v1/requests/req_abc123xyz" \
-H "X-API-Key: YOUR_API_KEY"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
request_id:"req_abc123xyz"
status:"completed"
processing_time_ms:2500
result_data:{
invoice_number:"INV-2025-001"
vendor_name:"ABC Supplies Co."
date:"2025-01-20"
total_amount:1250.00
currency:"USD"
line_items:[
{description:"Office Supplies" quantity:10 unit_price:50.00 amount:500.00}
{description:"Paper" quantity:5 unit_price:150.00 amount:750.00}
]
}/v1/ws/statusAuth: X-API-KeyThe /v1/ws/status WebSocket endpoint provides real-time status updates for document processing requests. Unlike REST polling, this endpoint maintains a persistent connection and pushes updates to your client whenever request status changes, eliminating the need for repeated queries.
When to use: Use WebSocket for interactive user dashboards, progress tracking, or real-time notifications. Use REST polling for batch processing or stateless API integrations.
URL:
ws://149.102.159.66:8000/v1/ws/status
wss://149.102.159.66:8000/v1/ws/status # Production with TLSAuthentication:
Pass your API key via the X-API-Key header before connection:
X-API-Key: <your_api_key>Connection Lifecycle:
action: connection acknowledgmentClients send JSON messages to control subscriptions and health checks:
Subscribe to Request Updates
Start tracking status updates for a specific request ID.
{
"action": "subscribe",
"request_id": "req_32e69baba8054d018cb5c31f034eca52"
}Unsubscribe from Request Updates
Stop tracking a request (server auto-unsubscribes on terminal status).
{
"action": "unsubscribe",
"request_id": "req_32e69baba8054d018cb5c31f034eca52"
}Keepalive Check (Ping)
Send periodically to prevent inactivity timeout. Server responds with pong.
{
"action": "ping"
}| Action | Required Fields | Purpose |
|---|---|---|
| subscribe | request_id | Start receiving updates for a request |
| unsubscribe | request_id | Stop tracking a request |
| ping | — | Keepalive; server responds with pong |
The server sends control messages and status events to connected clients:
Connection Acknowledgment
Sent immediately after successful authentication.
{
"action": "connection",
"status": "connected",
"message": "Authentication successful. Ready to subscribe."
}Snapshot Event
Current request state sent immediately upon subscription.
{
"event": "snapshot",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"status": "PROCESSING",
"message": "processing",
"submitted_at": "2026-03-16T10:00:00Z",
"completed_at": null,
"processing_time_ms": null,
"result_data": null,
"formatted_result": null,
"error_message": null,
"is_terminal": false
}Update Event
Sent whenever request status or result changes.
{
"event": "update",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"status": "COMPLETED",
"message": "completed",
"submitted_at": "2026-03-16T10:00:00Z",
"completed_at": "2026-03-16T10:01:23Z",
"processing_time_ms": 83420,
"result_data": {
"document_type": "invoice",
"fields": {
"invoice_number": "INV-1009",
"amount": "1200.00",
"vendor": "Acme Corp"
}
},
"formatted_result": {
"summary": "Invoice INV-1009 from Acme Corp",
"amount": "$1,200.00"
},
"error_message": null,
"is_terminal": true
}Heartbeat Event
Sent every ~5 seconds when no state changes have occurred. Confirms connection is alive.
{
"event": "heartbeat",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"status": "PROCESSING",
"message": "processing",
"submitted_at": "2026-03-16T10:00:00Z",
"completed_at": null,
"processing_time_ms": null,
"result_data": null,
"formatted_result": null,
"error_message": null,
"is_terminal": false
}Subscribe Acknowledgment
Confirms subscription success or failure before snapshot is sent.
{
"action": "ack",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"success": true,
"message": "Subscription created"
}Pong Response
Server response to client ping, includes server timestamp.
{
"action": "pong",
"timestamp": 1710581325.123
}Per-Request Error Event
Sent when a request operation fails (e.g., permission denied, not found).
{
"action": "error",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"error": "Request not found or access denied"
}Unknown Action Error
Sent when client sends unrecognized action.
{
"action": "error",
"error": "Unknown action: invalid_action"
}| Message Type | When Sent | Purpose |
|---|---|---|
| connection | After successful auth | Confirms connection ready |
| snapshot | Immediately on subscribe | Current request state |
| update | When status/result changes | Live status updates |
| heartbeat | Every ~5s (idle) | Confirms socket is active |
| ack | After subscribe/unsubscribe | Operation confirmation |
| pong | In response to ping | Keepalive response |
| error | On request or action failure | Error details |
Every RequestStatusEvent (snapshot, update, heartbeat) contains these fields:
| Field | Type | Always Present | Description |
|---|---|---|---|
| event | string | Yes | One of: "snapshot" | "update" | "heartbeat" |
| request_id | string | Yes | Unique identifier for the request being tracked |
| status | string | Yes | Processing status (see Status Values section) |
| message | string | Yes | Human-readable lowercase status label (e.g., "processing", "completed"). Use for UI display. |
| submitted_at | ISO 8601 | Yes | When the request was submitted (e.g., "2026-03-16T10:00:00Z") |
| completed_at | ISO 8601 | null | Yes | When processing completed (null if still processing) |
| processing_time_ms | integer | null | Yes | Wall-clock milliseconds from submission to completion (null while processing) |
| result_data | object | null | Yes | Raw unprocessed result output (available only when status === "COMPLETED") |
| formatted_result | object | null | Yes | Post-processed, display-ready result (available only when status === "COMPLETED"). Prefer this over result_data for UI rendering. |
| error_message | string | null | Yes | Error details (populated only when status === "FAILED") |
| is_terminal | boolean | Yes | True if status is terminal (COMPLETED, FAILED, CANCELLED, TIMEOUT). After a terminal event, the server auto-unsubscribes. |
The server follows strict timing intervals for polling and keepalive:
Poll Interval: 1.5 seconds
Server checks request status every 1.5 seconds. If status has changed since the last check, an update event is sent.
Heartbeat Interval: 5.0 seconds
If no status change occurs within ~5 seconds, a heartbeat event is sent (with current state). This confirms the connection is alive without broadcasting false updates.
Event Type Selection
update: Sent when status or result changed (detected on poll interval)heartbeat: Sent when nothing changed for 5 seconds (keepalive signal)WebSocket Close Codes
1008 — Policy Violation
JWT authentication failed or expired. Reconnect with a valid token.
1011 — Internal Error
Unexpected server error. Check server logs and retry with exponential backoff.
1000 — Normal Closure
Expected disconnect after all subscriptions completed, or client-initiated close.
Per-Request Errors
If a subscribe/unsubscribe fails, server sends an error event instead of an ack:
{
"action": "error",
"request_id": "req_32e69baba8054d018cb5c31f034eca52",
"error": "Request not found or access denied"
}Distinguishing Errors
action: error JSON message → subscribe/unsubscribe failed for that request IDBest practices for handling disconnections and recovering active subscriptions:
1. Track Active Subscriptions
Maintain a set of currently active request IDs on the client side.
2. Exponential Backoff on Reconnect
Start with 1 second, then 2s, 4s, 8s, etc., up to 60s. Prevents thundering herd on server restart.
3. Re-subscribe After Reconnect
Once the new WebSocket is open, re-issue subscribe messages for all active request IDs. The server will send fresh snapshots.
4. Deduplicate Snapshots
If a snapshot arrives after you've already received updates for that request, ignore the snapshot (compare timestamps or version numbers).
5. Heartbeat Timeout
If no message arrives for 15+ seconds, close and reconnect. Don't wait forever.
| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | your_api_key |
Step 1: Paste your API key in the X-API-Key header
Step 2: Click Connect to establish WebSocket connection
Step 3: Send subscription message in Message tab:
{
"action": "subscribe",
"request_id": "req_example_id"
}Step 4: Observe snapshot, update, and heartbeat events
/v1/voice/text-to-speechAuth: API KeyConvert text to speech audio. Returns base64 encoded audio data. Maximum text length is 5000 characters.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Content-Type | text/plain (TOON format) | Required |
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Required | Text to convert to speech (max 5000 chars) |
| language | string | Optional | Language code (default: 'en') |
Example:
text:"Hello, this is a text to speech demo."
language:"en"curl -X POST "http://149.102.159.66:8000/v1/voice/text-to-speech" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: text/plain" \
-d 'text:"Hello, this is a text to speech demo."
language:"en"'| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | text/plain (TOON format) |
text:"Hello, this is a text to speech demo." language:"en"
audio:"UklGRiQA..." (base64 encoded audio)
mimeType:"audio/mpeg"
duration:"2.5s"
processing_time:"0.8s"
model:"tts-1"
voice:"default"/v1/voice/speech-to-textAuth: API KeyConvert audio to text transcription. Supports WAV, MP3, OGG, M4A, FLAC, WEBM formats. Maximum file size is 10MB.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Content-Type | multipart/form-data | Required |
| Field | Type | Required | Description |
|---|---|---|---|
| audio | file | Required | Audio file (WAV, MP3, OGG, M4A, FLAC, WEBM - max 10MB) |
curl -X POST "http://149.102.159.66:8000/v1/voice/speech-to-text" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx" \
-F "audio=@/path/to/recording.wav"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Content-Type | multipart/form-data |
| ✓ | audio | Select File |
text:"This is the transcribed text from the audio file."
language:"en"
confidence:0.95
duration:"5.2s"
processing_time:"1.2s"
model:"whisper"/v1/history/documentsAuth: API KeyRetrieve paginated document processing history including bank statements, invoices, and receipts. Supports filtering by document type, status, and date range.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Accept | text/plain | Optional |
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number (default: 1) |
| page_size | integer | Optional | Items per page (default: 20, max: 100) |
| document_type | string | Optional | Filter by type: BankStatement, Receipt, Invoice |
| status_filter | string | Optional | Filter by status: COMPLETED, FAILED, PENDING, PROCESSING |
| date_from | datetime | Optional | Filter from date (ISO format) |
| date_to | datetime | Optional | Filter to date (ISO format) |
curl -X GET "http://149.102.159.66:8000/v1/history/documents?page=1&page_size=10&document_type=BankStatement" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Accept | text/plain |
Enter your TOON formatted data here
total:70
page:1
page_size:10
document_type_filter:"BankStatement"
items:[
{
request_id:"req_abc123"
document_type:"BankStatementPDF"
original_filename:"statement.pdf"
file_size_bytes:54022
status:"COMPLETED"
submitted_at:"2025-01-23T06:23:11Z"
completed_at:"2025-01-23T06:23:20Z"
processing_duration_ms:5487
is_success:true
summary:{
document_type:"bank_statement"
extraction_confidence:0.95
opening_balance:1500.00
closing_balance:2350.00
transaction_count:15
}
processing_result:{...full extraction data...}
}
]
stats:{
total_requests:70
completed_requests:65
failed_requests:5
avg_processing_time_ms:3500
total_data_processed_bytes:5242880
}/v1/history/speech-to-textAuth: API KeyRetrieve paginated speech-to-text processing history. Shows all audio transcription requests with input/output data.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Accept | text/plain | Optional |
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number (default: 1) |
| page_size | integer | Optional | Items per page (default: 20, max: 100) |
| success_only | boolean | Optional | Filter only successful requests |
| date_from | datetime | Optional | Filter from date (ISO format) |
| date_to | datetime | Optional | Filter to date (ISO format) |
curl -X GET "http://149.102.159.66:8000/v1/history/speech-to-text?page=1&page_size=10" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Accept | text/plain |
Enter your TOON formatted data here
total:25
page:1
page_size:10
voice_type:"speech-to-text"
items:[
{
log_id:123
request_id:"stt_abc123"
endpoint:"speech-to-text"
access_timestamp:"2025-01-23T10:30:00Z"
is_success:true
http_status_code:200
latency_ms:1500
processing_time_ms:1200
file_size_bytes:256000
input_data:{
filename:"recording.wav"
language:"en"
}
output_data:{
text:"Transcribed text from audio..."
confidence:0.95
}
}
]
stats:{
total_requests:25
successful_requests:23
failed_requests:2
avg_latency_ms:1400
}/v1/history/text-to-speechAuth: API KeyRetrieve paginated text-to-speech processing history. Shows all audio generation requests with input/output data.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Accept | text/plain | Optional |
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number (default: 1) |
| page_size | integer | Optional | Items per page (default: 20, max: 100) |
| success_only | boolean | Optional | Filter only successful requests |
| date_from | datetime | Optional | Filter from date (ISO format) |
| date_to | datetime | Optional | Filter to date (ISO format) |
curl -X GET "http://149.102.159.66:8000/v1/history/text-to-speech?page=1&page_size=10" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Accept | text/plain |
Enter your TOON formatted data here
total:18
page:1
page_size:10
voice_type:"text-to-speech"
items:[
{
log_id:456
request_id:"tts_xyz789"
endpoint:"text-to-speech"
access_timestamp:"2025-01-23T11:00:00Z"
is_success:true
http_status_code:200
latency_ms:800
processing_time_ms:600
input_data:{
text:"Hello, this is a test."
language:"en"
}
output_data:{
mimeType:"audio/mpeg"
duration:"2.5s"
}
}
]
stats:{
total_requests:18
successful_requests:17
failed_requests:1
avg_latency_ms:750
}/v1/history/summaryAuth: API KeyGet an overview summary of all processing history including document counts by type and voice processing statistics.
| Header | Value | Required |
|---|---|---|
| X-API-Key | YOUR_API_KEY | Required |
| Accept | text/plain | Optional |
curl -X GET "http://149.102.159.66:8000/v1/history/summary" \
-H "X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxx"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | X-API-Key | YOUR_API_KEY |
| ✓ | Accept | text/plain |
document_processing:{
by_type:{
BankStatementPDF:25
BankStatementImage:10
ReceiptPDF:30
InvoicePDF:15
}
total:80
categories:{
bank_statements:35
receipts:30
invoices:15
}
}
voice_processing:{
by_type:{
speech-to-text:25
text-to-speech:18
}
total:43
speech_to_text:25
text_to_speech:18
}
total_requests:123
last_request_at:"2025-01-23T11:30:00Z"/healthAuth: None (Public)Check if the API server is running and healthy. This endpoint is public and requires no authentication.
| Header | Value | Required |
|---|---|---|
| Accept | application/json | Optional |
curl -X GET "http://149.102.159.66:8000/health"| ✓ | KEY | VALUE |
|---|---|---|
| ✓ | Accept | application/json |
status:"healthy"
timestamp:"2025-01-27T12:00:00Z"
version:"1.0.0"
uptime_seconds:86400| Status Code | Meaning | Common Causes |
|---|---|---|
200 | Success | Request completed successfully |
201 | Created | Resource created successfully |
400 | Bad Request | Missing required fields, invalid format |
401 | Unauthorized | Missing or invalid token/API key |
403 | Forbidden | Valid auth but insufficient permissions |
404 | Not Found | Resource doesn't exist |
409 | Conflict | Resource already exists (e.g., email taken) |
429 | Rate Limited | Too many requests |
500 | Server Error | Internal server error |
503 | Unavailable | Service temporarily unavailable |
504 | Timeout | Request timed out during processing |
If you have questions or run into issues, check our support resources.