# 1. Create a project
curl -X POST 'https://api.imagen-ai.com/v1/projects/' \
--header 'x-api-key: $IMAGEN_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"name": "Smith Wedding 2026"}'
# 2. Start editing
curl -X POST 'https://api.imagen-ai.com/v1/projects/$PROJECT_UUID/edit' \
--header 'x-api-key: $IMAGEN_API_KEY' \
--header 'Content-Type;' \
--data '{"profile_key": 5700, "crop": true, "smooth_skin": true}'
import asyncio, os
from imagen_sdk import quick_edit, EditOptions
result = asyncio.run(quick_edit(
api_key=os.environ["IMAGEN_API_KEY"],
profile_key=5700,
image_paths=["./shoot/DSC_001.CR3", "./shoot/DSC_002.CR3"],
edit_options=EditOptions(crop=True, smooth_skin=True),
download=True,
download_dir="./out",
))
print(f"Done — {len(result.downloaded_files)} files in ./out")
import { quickEdit } from 'imagen-ai-sdk';
const result = await quickEdit(process.env.IMAGEN_API_KEY!, {
profileKey: 5700,
imagePaths: ['./shoot/DSC_001.CR3', './shoot/DSC_002.CR3'],
editOptions: { crop: true, smooth_skin: true },
download: true,
downloadDir: './out',
});
console.log(`Done — ${result.downloadedFiles?.length} files in ./out`);
import imagen "github.com/imagenai/imagen-ai-sdk/sdks/go"
client, _ := imagen.NewClient(os.Getenv("IMAGEN_API_KEY"))
opts := imagen.EditOptions{}
opts.Crop = imagen.Bool(true)
opts.SmoothSkin = imagen.Bool(true)
result, err := client.QuickEdit(context.Background(), imagen.QuickEditParams{
ProfileKey: 5700,
ImagePaths: []string{"./shoot/DSC_001.CR3", "./shoot/DSC_002.CR3"},
EditOptions: opts,
Download: true,
DownloadDir: "./out",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Done — %d files in ./out\n", len(result.DownloadedFiles))
import java.net.URI;
import java.net.http.*;
// 1. Create a project
var createBody = """
{"name": "Smith Wedding 2026"}
""";
var createReq = HttpRequest.newBuilder()
.uri(URI.create("https://api.imagen-ai.com/v1/projects/"))
.header("x-api-key", System.getenv("IMAGEN_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(createBody))
.build();
var createRes = HttpClient.newHttpClient()
.send(createReq, HttpResponse.BodyHandlers.ofString());
// 2. Start editing
var editBody = """
{"profile_key": 5700, "crop": true, "smooth_skin": true}
""";
var editReq = HttpRequest.newBuilder()
.uri(URI.create("https://api.imagen-ai.com/v1/projects/" + projectUuid + "/edit"))
.header("x-api-key", System.getenv("IMAGEN_API_KEY"))
.header("Content-Type", "")
.POST(HttpRequest.BodyPublishers.ofString(editBody))
.build();
HttpClient.newHttpClient().send(editReq, HttpResponse.BodyHandlers.ofString());
require 'net/http'
require 'json'
require 'uri'
# 1. Create a project
uri = URI('https://api.imagen-ai.com/v1/projects/')
req = Net::HTTP::Post.new(uri)
req['x-api-key'] = ENV['IMAGEN_API_KEY']
req['Content-Type'] = 'application/json'
req.body = { name: 'Smith Wedding 2026' }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
project = JSON.parse(res.body)['data']
# 2. Start editing
edit_uri = URI("https://api.imagen-ai.com/v1/projects/#{project['project_uuid']}/edit")
edit_req = Net::HTTP::Post.new(edit_uri)
edit_req['x-api-key'] = ENV['IMAGEN_API_KEY']
edit_req['Content-Type'] = ''
edit_req.body = { profile_key: 5700, crop: true, smooth_skin: true }.to_json
Net::HTTP.start(edit_uri.hostname, edit_uri.port, use_ssl: true) { |http| http.request(edit_req) }
<?php
// 1. Create a project
$ch = curl_init('https://api.imagen-ai.com/v1/projects/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('IMAGEN_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['name' => 'Smith Wedding 2026']),
]);
$project = json_decode(curl_exec($ch), true)['data'];
curl_close($ch);
// 2. Start editing
$ch = curl_init('https://api.imagen-ai.com/v1/projects/' . $project['project_uuid'] . '/edit');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('IMAGEN_API_KEY'),
'Content-Type:',
],
CURLOPT_POSTFIELDS => json_encode(['profile_key' => 5700, 'crop' => true, 'smooth_skin' => true]),
]);
curl_exec($ch);
curl_close($ch);
using System.Net.Http;
using System.Text;
using System.Text.Json;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key",
Environment.GetEnvironmentVariable("IMAGEN_API_KEY"));
// 1. Create a project
var createPayload = JsonSerializer.Serialize(new { name = "Smith Wedding 2026" });
var createContent = new StringContent(createPayload, Encoding.UTF8, "application/json");
var createRes = await client.PostAsync(
"https://api.imagen-ai.com/v1/projects/", createContent);
var project = (await JsonDocument.ParseAsync(
await createRes.Content.ReadAsStreamAsync())).RootElement.GetProperty("data");
// 2. Start editing
var editPayload = JsonSerializer.Serialize(
new { profile_key = 5700, crop = true, smooth_skin = true });
var editContent = new StringContent(editPayload, Encoding.UTF8, "");
await client.PostAsync(
$"https://api.imagen-ai.com/v1/projects/{project.GetProperty("project_uuid").GetString()}/edit",
editContent);