Projects and assets
Projects
Section titled “Projects”A project holds assets and generations. Every request that creates something takes an optional project; without it, the credential’s default project is used. For an API key the default is chosen when the key is created. For an OAuth app it is the only project the user shared, when they shared exactly one.
| Endpoint | Does |
|---|---|
GET /v1/projects |
Lists the projects the credential can see, most recently changed first. ?status=archived lists archived ones. |
POST /v1/projects |
Creates a project. Needs a credential with access to all projects, or the answer is 403 project_not_shared. |
GET /v1/projects/{id} |
One project with its brief. |
PATCH /v1/projects/{id} |
Changes the name, intent or brief. Send only the fields to change. |
POST /v1/projects/{id}/archive |
Archives a project. Its assets stay available; it is read-only in the app. |
A project the credential cannot see answers 404 not_found, the same as one that does not exist.
The brief
Section titled “The brief”A brief describes what the work is for. Every field is optional:
| Field | Meaning |
|---|---|
goal |
What the work is for. |
product |
The product or service. |
audience |
Who it is for. |
selling_points |
What to show or say about it (a list). |
brand_guidance |
Brand voice and look. |
claims_to_avoid |
Claims the work must not make (a list). |
mood |
The tone and feel. |
story |
A story or structure to follow. |
# Creates a project with a brief. Needs an API key with access to all projects.set -euo pipefailAPI="${HL_API_BASE:-https://api.halationlab.ai/v1}"
curl -sS --fail-with-body "$API/projects" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "name": "Spring campaign", "intent": "commercial", "brief": { "product": "A reusable steel water bottle that keeps drinks cold for 24 hours", "audience": "Commuters who cycle to work", "mood": "Bright, fresh, early morning", "claims_to_avoid": ["Medical or health claims"] } }'Generate with the brief
Section titled “Generate with the brief”Send "use_brief": true to apply the project’s brief to the prompt. It is off by default. Quote with the same flag to price the request with the brief applied.
# Generates into a project with its brief applied to the prompt. Spends at most 100 tokens.set -euo pipefailAPI="${HL_API_BASE:-https://api.halationlab.ai/v1}"
curl -sS --fail-with-body "$API/generations" \ -H "Authorization: Bearer $HALATIONLAB_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Prefer: wait=60" \ -H "Content-Type: application/json" \ -d @- <<JSON{ "model": "flux.2-pro", "project": "$HL_PROJECT_ID", "use_brief": true, "input": { "prompt": "The bottle on a bicycle handlebar at sunrise", "aspect_ratio": "4:5" }, "max_cost": 100}JSONAssets
Section titled “Assets”GET /v1/assets lists uploads, imports and generated outputs in the projects the credential can see. Filter with ?project=, ?type= (video, image, audio) and ?origin= (upload, generation, derived). Each asset has its status, size, dimensions and duration, the generation that made it, and a download url once it is ready.
See Uploading media to add files, transform them and delete them.