Skip to content

feat: Add background blur#92

Open
faisalburhanudin wants to merge 4 commits intomainfrom
feat/blur-background
Open

feat: Add background blur#92
faisalburhanudin wants to merge 4 commits intomainfrom
feat/blur-background

Conversation

@faisalburhanudin
Copy link
Contributor

@faisalburhanudin faisalburhanudin commented Jan 23, 2026

Summary

Add background blur effect using DeepInfra Bria API when "Background Blur" trait is selected

Test

image

- Add DEEPINFRA_API_KEY configuration support
- Implement blurBackground() service method using multipart/form-data
- Add background blur trait to user options
- Integrate blur processing in portrait generation workflow
- Return encapsulated ImageData from blur service
- Add graceful fallback if blur processing fails
@faisalburhanudin faisalburhanudin changed the title feat: Add background blur and GoFood integration feat: Add background blur Jan 23, 2026
provider?: string;
}

interface DeepInfraResponse {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for consistency purposes

Suggested change
interface DeepInfraResponse {
type DeepInfraResponse = {

throw new Error('No blurred image URL returned from DeepInfra API');
}

const imageUrl = data.images[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we check whether data.images is really and array and having item in the first index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants