The Process API enables you to transform existing images with style transfer and edits. Perfect for building content creation tools, media processing pipelines, batch transformations, and creative applications.Documentation Index
Fetch the complete documentation index at: https://docs.platform.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
For video processing (video editing, motion control), use the Queue API which provides asynchronous job-based processing.
Image Editing
Transform and restyle existing images:ImageToImageInput parameters:
prompt(required) - Text description of the style transformationdata(required) - Input image asFileInputseed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolution (.res720por.res480p)enhancePrompt(optional) - Auto-enhance the prompt for better results
lucy_image_2
Input Types
TheFileInput type provides static factory methods for creating inputs:
Error Handling
.invalidAPIKey- API key is invalid or missing.invalidInput(String)- Invalid input parameters or validation failed.processingError(String)- Server-side processing error.modelNotFound(String)- Specified model doesn’t exist.networkError(Error)- Network request failed
Complete Example
API Reference
client.createProcessClient(model:input:)
Creates a process client for image editing.
Parameters:
model: ImageModel- Image model (.lucy_image_2)input: ImageToImageInput- Image editing input
ProcessClient
Throws: DecartError if the model URL cannot be constructed
processClient.process()
Sends the image for processing and returns the result.
Returns: Data - The transformed image bytes
Throws: DecartError on network or processing failure
Next Steps
Queue API
Asynchronous video processing with job-based queue
Realtime API
Transform video streams in realtime with WebRTC