Error Codes

Complete reference of error codes returned by the LogTalk API. All errors include a documentation URL for additional help.

Error Response Format

All API errors follow a consistent format:

{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {
"field": "additional context"
},
"documentation_url": "https://docs.logtalk.io/errors/ERROR_CODE"
},
"request_id": "req_1kn5f2a_a3b4c5d6e7f8",
"timestamp": "2026-01-18T12:00:00.000Z"
}
FieldDescription
successAlways false for errors
error.codeMachine-readable error code for programmatic handling
error.messageHuman-readable description of the error
error.detailsAdditional context (optional, varies by error)
error.documentation_urlLink to documentation for this error
request_idUnique identifier for debugging and support

HTTP Status Codes

StatusDescription
200Success
202Accepted (async processing started)
400Bad Request - Invalid parameters or request body
401Unauthorized - Missing or invalid API key
402Payment Required - Quota exceeded
403Forbidden - Insufficient permissions or tier
404Not Found - Resource does not exist
408Request Timeout - Processing took too long
409Conflict - Idempotency key conflict
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable - Temporary maintenance

Authentication Errors (401)

Error CodeDescriptionResolution
MISSING_API_KEYNo Authorization header providedAdd the Authorization header with your API key
INVALID_API_KEYAPI key format invalid or not foundCheck the key format and verify it exists
EXPIRED_API_KEYAPI key has expiredCreate a new API key in your dashboard

Authorization Errors (403)

Error CodeDescriptionResolution
API_ACCESS_DENIEDAPI access requires Growth tier or higherUpgrade your subscription to access the API
INSUFFICIENT_PERMISSIONSAPI key lacks required permissionsCreate a key with appropriate permissions
RESOURCE_ACCESS_DENIEDYou do not have access to this resourceVerify the resource belongs to your organization

Validation Errors (400)

Error CodeDescriptionResolution
VALIDATION_ERRORRequest validation failedCheck the error details for specific field issues
INVALID_REQUESTInvalid JSON in request bodyVerify your JSON is well-formed
MISSING_REQUIRED_FIELDA required field is missingInclude all required fields in your request
INVALID_FIELD_VALUEField value is invalidCheck the allowed values for the field
CONTENT_TOO_LARGEContent exceeds maximum size (50KB)Reduce the content size
INVALID_RETRY_STATEConversion cannot be retried in its current stateOnly failed episodes can be retried

Quota Errors (402)

Error CodeDescriptionResolution
AUDIO_QUOTA_EXCEEDEDMonthly audio episode quota exceededPurchase credits or upgrade your plan
VIDEO_QUOTA_EXCEEDEDMonthly video episode quota exceededPurchase credits or upgrade your plan
QUOTA_EXCEEDEDGeneral quota exceededCheck your usage and upgrade if needed

Rate Limit Errors (429)

Error CodeDescriptionResolution
DAILY_LIMIT_EXCEEDEDDaily API request limit exceededWait until the daily limit resets (midnight UTC)
MINUTE_LIMIT_EXCEEDEDPer-minute request limit exceededWait and retry after the Retry-After interval
CONCURRENT_LIMIT_EXCEEDEDToo many concurrent processing jobsWait for existing jobs to complete

Rate limit responses include a Retry-After header indicating how many seconds to wait before retrying.

Resource Errors (404)

Error CodeDescriptionResolution
CONVERSION_NOT_FOUNDConversion does not existVerify the episode ID
SCRIPT_NOT_FOUNDScript does not exist or has expiredGenerate a new script (scripts expire after 2 hours)
ORGANIZATION_NOT_FOUNDOrganization does not existVerify the organization ID
RESOURCE_NOT_FOUNDGeneric resource not foundCheck the resource identifier

Conflict Errors (409)

Error CodeDescriptionResolution
IDEMPOTENCY_CONFLICTIdempotency key used with different requestUse a unique idempotency key for different requests

Server Errors (500, 503)

Error CodeDescriptionResolution
INTERNAL_ERRORAn unexpected error occurredRetry the request; contact support if it persists
GENERATION_FAILEDScript or audio generation failedCheck content validity; retry the request
SERVICE_UNAVAILABLEService is temporarily unavailableWait and retry; check status page

Handling Errors

Best practices for handling API errors:

Error Handling Example
async function createConversion(content) {
const response = await fetch('https://api.logtalk.io/v1/episodes', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.LOGTALK_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ content, output_format: 'audio' })
});
const data = await response.json();
if (!data.success) {
const { error } = data;
switch (error.code) {
case 'AUDIO_QUOTA_EXCEEDED':
console.error('Quota exceeded, need to upgrade or purchase credits');
break;
case 'DAILY_LIMIT_EXCEEDED':
const retryAfter = response.headers.get('Retry-After');
console.error(`Rate limited, retry after ${retryAfter} seconds`);
break;
case 'VALIDATION_ERROR':
console.error('Invalid request:', error.details);
break;
case 'INVALID_RETRY_STATE':
console.error('Cannot retry episode in current state');
break;
default:
console.error(`Error ${error.code}: ${error.message}`);
console.error(`Documentation: ${error.documentation_url}`);
}
throw new Error(error.message);
}
return data.data;
}