Skip to main content
All errors return specific codes in the message field for programmatic handling.

Error Categories

Issues caused by invalid requests or insufficient resources.
Description: Not enough credits to complete the requestSolution: Add more credits to your account
{
  "detail": "INSUFFICIENT_CREDITS"
}
Description: Generation with specified ID does not existSolution: Verify the generation ID is correct
{
  "detail": "Generation not found"
}
Description: Request parameters are invalid or missing required fieldsSolution: Check parameter values and types
{
  "detail": "Validation error: prompt is required"
}
Description: One or more input images are not validSolution: Ensure you’re uploading valid JPEG, PNG, GIF, or WEBP files
{
  "status": "failed",
  "message": "INVALID_IMAGE"
}
Description: One or more image URLs are inaccessibleSolution: Verify all image URLs are accessible via HTTPS
{
  "status": "failed",
  "message": "IMAGE_INACCESSIBLE"
}
Description: More than 5 images providedSolution: Limit input images to maximum of 5 total
{
  "detail": "Maximum 5 images allowed, got 6"
}
Description: Both images_url and images_base64 provided in the same requestSolution: Use only one image input method per request
{
  "detail": "Cannot provide both images_base64 and images_url"
}
Description: Duration value not in allowed options (5, 10, 15)Solution: Use one of the supported duration values
{
  "detail": "Duration must be 5, 10, or 15 seconds"
}
Description: Model value not ‘kling_o3’ or ‘kling_o3_pro’Solution: Use ‘kling_o3’ for Standard or ‘kling_o3_pro’ for Pro quality
{
  "detail": "Model must be 'kling_o3' or 'kling_o3_pro'"
}

HTTP Status Code Reference

201
Created
Generation created successfully
200
OK
Request successful
400
Bad Request
Invalid parameters or request format
401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient credits
404
Not Found
Generation not found
422
Validation Error
Invalid input format or missing required fields
500
Internal Server Error
Server-side error
503
Service Unavailable
Service temporarily unavailable

Common Issues & Solutions

Possible causes:
  • Prompt contains prohibited content
  • Invalid image format or corrupted file
  • Image URLs are not accessible
  • Mixed images_url and images_base64
Solution:
  • Check webhook payload for specific error code
  • Validate all images are accessible
  • Use only one image input method
  • Review content guidelines
Normal timeline:
  • 5s Standard: 2-3 minutes
  • 10s Standard: 3-5 minutes
  • 15s Standard: 5-7 minutes
  • Pro mode: Add 30-50% more time
If exceeds 10 minutes: Check status endpoint or wait for webhookIf exceeds 15 minutes: Automatic timeout, credits refunded
If generation failed: Credits are automatically refunded within 5 minutesIf successful but no URL: Check the status endpoint - the webhook may have failed to deliverTo verify: Use GET /v1/kling/o3-video/generations/{generation_id}
Common mistakes:
  • Using both images_url and images_base64 (pick one)
  • More than 5 images
  • Images larger than 10 MB each
  • Invalid image formats (use JPEG, PNG, GIF, WEBP)
  • Images not accessible via HTTPS
Solution: Validate inputs before sending request
Standard (kling_o3) - 720p:
  • ✅ Faster generation (2-5 min)
  • ✅ Lower cost
  • ✅ Good for social media, previews
  • ❌ Lower resolution
Pro (kling_o3_pro) - 1080p:
  • ✅ Higher quality
  • ✅ Better for professional use
  • ❌ Slower generation (+30-50% time)
  • ❌ Higher cost (~2x price)

Error Handling Examples

function validateO3VideoRequest(request) {
  const errors = [];
  
  // Prompt validation
  if (!request.prompt || request.prompt.length < 1) {
    errors.push('Prompt is required');
  }
  if (request.prompt && request.prompt.length > 2500) {
    errors.push('Prompt must be ≤ 2500 characters');
  }
  
  // Image validation
  const hasUrls = request.images_url && request.images_url.length > 0;
  const hasBase64 = request.images_base64 && request.images_base64.length > 0;
  
  if (hasUrls && hasBase64) {
    errors.push('Cannot provide both images_url and images_base64');
  }
  
  const totalImages = (request.images_url?.length || 0) + 
                     (request.images_base64?.length || 0);
  if (totalImages > 5) {
    errors.push(`Maximum 5 images allowed, got ${totalImages}`);
  }
  
  // Duration validation
  if (request.duration && !['5', '10', '15'].includes(request.duration)) {
    errors.push('Duration must be 5, 10, or 15 seconds');
  }
  
  // Mode validation
  if (request.mode && !['std', 'pro'].includes(request.mode)) {
    errors.push("Mode must be 'std' or 'pro'");
  }
  
  // Aspect ratio validation
  if (request.aspect_ratio && 
      !['16:9', '9:16', '1:1'].includes(request.aspect_ratio)) {
    errors.push('Invalid aspect ratio');
  }
  
  if (errors.length > 0) {
    throw new Error(errors.join('; '));
  }
  
  return true;
}
Always handle errors programmatically using the error codes, not human-readable messages. Error messages may change, but codes remain stable.

Troubleshooting Guide

1

Check API Key

Ensure your API key is valid and has not expired
curl -X GET https://platform.runblob.io/v1/account \
  -H "Authorization: Bearer YOUR_API_KEY"
2

Validate Request

Use client-side validation before sending requests to catch errors early
3

Check Webhook Logs

If using webhooks, check your server logs for detailed error information
4

Monitor Credits

Keep track of your credit balance to avoid INSUFFICIENT_CREDITS errors
5

Contact Support

If errors persist, contact support with your generation_id