Projects
Group your generations into projects.
Projects keep related generations together. They show up in your history on the website, so anything you file through the API is easy to find there too. A generation can belong to more than one project.
Every project has a project_id that MachGen assigns when you create it. Use the
id, not the name, in requests: names can repeat and can change.
Find a project's ID
On the website, open the project menu and click the copy icon next to a project to copy its ID.
To look it up by name from a script, list your projects and pick the match:
curl -s -H "Authorization: Bearer $MACHGEN_API_KEY" https://api.machgen.ai/api/v0/projects \
| jq -r '.projects[] | select(.name == "Spring campaign") | .project_id'If several projects share that name, this prints all of their IDs.
Create a project
curl https://api.machgen.ai/api/v0/projects \
-H "Authorization: Bearer $MACHGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Spring campaign"}'{
"project_id": "3f1c9a52-8d7e-4b1a-9c55-2e6f0b7d4a19",
"name": "Spring campaign",
"task_count": 0,
"created_at": "2026-11-15T09:30:00Z",
"updated_at": "2026-11-15T09:30:00Z"
}List projects
GET /api/v0/projects returns your projects, most recently updated first.
curl -H "Authorization: Bearer $MACHGEN_API_KEY" https://api.machgen.ai/api/v0/projectsEach entry has the same fields as above, plus total_spent_micros: what the
project's generations have cost so far, in millionths of a dollar.
Update a project
PATCH /api/v0/projects/{project_id} changes only the fields you send and
returns the updated project. Today you can change name.
curl --request PATCH https://api.machgen.ai/api/v0/projects/$PROJECT_ID \
-H "Authorization: Bearer $MACHGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Spring campaign - final"}'Delete a project
curl --request DELETE https://api.machgen.ai/api/v0/projects/$PROJECT_ID \
-H "Authorization: Bearer $MACHGEN_API_KEY"Returns 204 No Content. Deleting a project keeps its generations; they stay in
your history.
Generate into a project
Add project_ids to the POST /api/v0/generate body, and the new generation is
filed into those projects as soon as it is submitted.
curl https://api.machgen.ai/api/v0/generate \
-H "Authorization: Bearer $MACHGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red panda exploring a misty forest at dawn",
"model": "Wan2.2-A14B",
"task_type": "T2V",
"video_config": {"duration_secs": 5, "height": 720, "aspect_ratio": "16:9"},
"project_ids": ["'"$PROJECT_ID"'"]
}'If any id is not one of your projects, the request fails with 404 Not Found
and nothing is generated. project_ids is not available on
/api/v0/generate/sync.