Use when an agent needs the colours of an image
baconservices.com/api/agent-commerce/v1/capabilities/image-palette/execute
Use when an agent needs the colours of an image: returns its dominant colours as hex codes with each one's share, most common first, as JSON.
POST
https://baconservices.com/api/agent-commerce/v1/capabilities/image-palette/executeUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://baconservices.com/api/agent-commerce/v1/capabilities/image-palette/execute", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"count":6,"image_url":"https://baconservices.com/assets/img/demos/background-remover-before.png","include_neutrals":true}),
});
console.log(await res.json());Example input
{
"count": 6,
"image_url": "https://baconservices.com/assets/img/demos/background-remover-before.png",
"include_neutrals": true
}More from Bacon Services
- baconservices.com/api/agent-commerce/v1/capabilities/accessibility-check/executeUse when an agent needs an automated accessibility check of a web page: WCAG 2.2 or 2.1 AA violations, with elements, criteria and fixes, as JSON.0.05
- baconservices.com/api/agent-commerce/v1/capabilities/brand-from-url/executeUse when an agent needs a company's brand from its website: returns its name, logo URLs, colours, fonts and social profiles as JSON.0.03
- baconservices.com/api/agent-commerce/v1/capabilities/page-metadata/executeUse when an agent needs a web page's SEO and link-preview metadata: title, description, canonical, robots, Open Graph, headings and issues, as JSON.0.01
- baconservices.com/api/agent-commerce/v1/capabilities/product-photo/executeUse when an agent needs an e-commerce product shot: removes a photo's background and centres the product on a 1600x1600 white WebP.0.10
- baconservices.com/api/agent-commerce/v1/capabilities/remove-background/executeUse when an agent needs a product or person cut out of a photo: removes the background and returns a transparent PNG at full size.0.05
- baconservices.com/api/agent-commerce/v1/capabilities/svg-cleanup/executeUse when an agent needs an SVG made safe and small: strips scripts and editor junk, rounds paths, returns the cleaned SVG with a report.0.01
- baconservices.com/api/agent-commerce/v1/capabilities/vectorize/executeUse when an agent needs a logo or icon as a vector: traces a PNG, JPEG or WebP into a scalable SVG of flat-colour paths.0.05
- baconservices.com/api/agent-commerce/v1/capabilities/web-image-optimizer/executeUse when an agent needs a web-ready image: shrinks a PNG, JPEG or WebP to a maximum width and converts it to WebP, keeping transparency.0.01
