Exemples de code
Appelez /api/process/sync depuis n'importe quel langage
Collez ces extraits dans votre base de code. Remplacez YOUR_API_KEY par la clé Bearer issue de Tableau de bord → Intégrations.
cURLPOST /api/process/sync
curl -X POST https://exifinjector.com/api/process/sync \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "images=@/path/to/photo.jpg" \
-F 'context={"topic":"leather duffel bag, handmade","brand":"Tradiclassy","language":"English","outputFormat":"original"}' \
--output processed.jpgNode.jsPOST /api/process/sync
import fs from "node:fs";
const form = new FormData();
form.append("images", new Blob([fs.readFileSync("photo.jpg")]), "photo.jpg");
form.append(
"context",
JSON.stringify({
topic: "leather duffel bag, handmade",
brand: "Tradiclassy",
language: "English",
outputFormat: "original",
})
);
const res = await fetch("https://exifinjector.com/api/process/sync", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body: form,
});
const buffer = Buffer.from(await res.arrayBuffer());
fs.writeFileSync("processed.jpg", buffer);PythonPOST /api/process/sync
import json
import requests
with open("photo.jpg", "rb") as f:
files = {"images": ("photo.jpg", f, "image/jpeg")}
data = {
"context": json.dumps({
"topic": "leather duffel bag, handmade",
"brand": "Tradiclassy",
"language": "English",
"outputFormat": "original",
})
}
res = requests.post(
"https://exifinjector.com/api/process/sync",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files=files,
data=data,
timeout=300,
)
with open("processed.jpg", "wb") as out:
out.write(res.content)PHPPOST /api/process/sync
<?php
$context = json_encode([
"topic" => "leather duffel bag, handmade",
"brand" => "Tradiclassy",
"language" => "English",
"outputFormat" => "original",
]);
$ch = curl_init("https://exifinjector.com/api/process/sync");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"images" => new CURLFile("photo.jpg", "image/jpeg", "photo.jpg"),
"context" => $context,
],
]);
$body = curl_exec($ch);
file_put_contents("processed.jpg", $body);
curl_close($ch);