78trust / 100

Images Image2image

by base.mapleai.shop in Other

x402 APIPassing, checked 2 h ago

Edit an image, priced per image and size

POST https://base.mapleai.shop/api/v1/images/image2image

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
186 ms typical, 273 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://base.mapleai.shop/api/v1/images/image2image" \
  -H "content-type: application/json" \
  -d '{"image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC","model":"gpt-image-2","n":1,"prompt":"Make the leaf green","size":"1024x1024"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fbase.mapleai.shop%2Fapi%2Fv1%2Fimages%2Fimage2image
const res = await pay("https://base.mapleai.shop/api/v1/images/image2image", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC","model":"gpt-image-2","n":1,"prompt":"Make the leaf green","size":"1024x1024"}),
});
console.log(await res.json());

Example input

{
  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC",
  "model": "gpt-image-2",
  "n": 1,
  "prompt": "Make the leaf green",
  "size": "1024x1024"
}

Example output

{
  "created": 1700000000,
  "data": [
    {
      "url": "https://example.com/image.png"
    }
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402251 ms$0.021
6 h agoPassed402273 ms$0.021
10 h agoPassed402177 ms$0.021
13 h agoPassed402187 ms$0.021
17 h agoPassed402186 ms$0.021
20 h agoPassed402191 ms$0.021
23 h agoPassed402244 ms$0.021
27 h agoPassed402277 ms$0.021
31 h agoPassed402229 ms$0.021
35 h agoPassed402184 ms$0.021
38 h agoPassed402186 ms$0.021
42 h agoPassed402171 ms$0.021
45 h agoPassed402170 ms$0.021
2 days agoPassed402120 ms$0.021