# 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")
const BASE = 'https://api.imagen-ai.com';
// 1. Create a project
const createRes = await fetch(`${BASE}/v1/projects/`, {
method: 'POST',
headers: {
'x-api-key': process.env.IMAGEN_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Smith Wedding 2026' }),
});
const { data: project } = (await createRes.json()) as {
data: { project_uuid: string };
};
// 2. Start editing
await fetch(`${BASE}/v1/projects/${project.project_uuid}/edit`, {
method: 'POST',
headers: {
'x-api-key': process.env.IMAGEN_API_KEY!,
'Content-Type': '',
},
body: JSON.stringify({ profile_key: 5700, crop: true, smooth_skin: true }),
});
import (
"bytes"
"encoding/json"
"net/http"
"os"
)
// 1. Create a project
body, _ := json.Marshal(map[string]any{"name": "Smith Wedding 2026"})
req, _ := http.NewRequestWithContext(ctx, http.MethodPost,
"https://api.imagen-ai.com/v1/projects/",
bytes.NewReader(body),
)
req.Header.Set("x-api-key", os.Getenv("IMAGEN_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
// 2. Start editing
editBody, _ := json.Marshal(map[string]any{
"profile_key": 5700, "crop": true, "smooth_skin": true,
})
editReq, _ := http.NewRequestWithContext(ctx, http.MethodPost,
"https://api.imagen-ai.com/v1/projects/"+projectUUID+"/edit",
bytes.NewReader(editBody),
)
editReq.Header.Set("x-api-key", os.Getenv("IMAGEN_API_KEY"))
editReq.Header.Set("Content-Type", "")
editResp, _ := http.DefaultClient.Do(editReq)
defer editResp.Body.Close()
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);