The user receives a processed image file with the background removed, generated by the API and returned as a binary response or URL, ready for download or further use.
The agent identifies the 'remove-bg' tool from the available tools list. It constructs a POST request to the /api/v1/process/remove-bg endpoint, attaching the user's image file and the user's API key in the header. The agent executes the request, handles the binary image response, and provides the result to the user. It verifies the request succeeded by checking for a 200 status code and valid image data.
- Category: Design and content
- Effect: Changes data in your accounts
- MCP servers: apiai.me MCP (https://koskamo.com/explore/apiai-me-mcp)
- Source: apiai.me Docs — API Pipelines & AI Orchestration Reference (https://apiai.me/docs)
- Source quote: "What you get after clicking Copy curl -X POST https://apiai.me/api/v1/process/remove-bg \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo.png" \ --output result.png"
- Playbook page: https://koskamo.com/explore/use-cases/execute-image-background-removal
Prompt: Remove the background from the attached image using the apiai.me service. Use the remove-bg tool and return the resulting image.