v1 · Base URL: api.assetforge.io

API Reference

The AssetForge REST API is organized around resources. All requests must be authenticated with a Bearer token and use JSON bodies.

BASE URL

https://api.assetforge.io/v1
POST/generate

Generate Assets

Submit a generation request. Returns a job ID you can poll for results. Supports SVG, PNG, ICO, favicon packages, and social kits.

Request Body

ParameterTypeRequiredDescription
promptstringYesNatural language description of the asset to generate.
formatsstring[]YesOutput formats. One or more of: svg, png, ico, favicon-package, social-kit.
widthnumberNoOutput width in pixels. Default: 512.
heightnumberNoOutput height in pixels. Default: 512.
backgroundstringNoBackground color as hex or "transparent". Default: "transparent".
stylestringNoStyle hint: minimal, bold, flat, outline, gradient, etc.
color_schemestring[]NoBrand color palette as hex values, e.g. ["#FF6B1A", "#06080c"].
webhook_urlstringNoPOST callback URL invoked when the job finishes.
bash
curl -X POST https://api.assetforge.io/v1/generate \
  -H "Authorization: Bearer af_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "minimalist tech startup logo with abstract geometry",
    "formats": ["svg", "png", "ico"],
    "width": 512,
    "height": 512,
    "background": "transparent",
    "style": "minimal",
    "color_scheme": ["#FF6B1A", "#06080c"]
  }'

Response

json
{
  "id": "job_1a2b3c4d5e6f",
  "status": "queued",
  "created_at": "2025-08-01T12:00:00Z",
  "estimated_seconds": 2
}
GET/jobs/:id

Get Job Status

Retrieve the status and results of a generation job. Poll this endpoint until status is complete or failed.

bash
curl https://api.assetforge.io/v1/jobs/job_1a2b3c4d5e6f \
  -H "Authorization: Bearer af_live_xxxxxxxxxxxxxxxxxxxx"

Response (complete)

json
{
  "id": "job_1a2b3c4d5e6f",
  "status": "complete",
  "created_at": "2025-08-01T12:00:00Z",
  "completed_at": "2025-08-01T12:00:02Z",
  "duration_ms": 1843,
  "assets": [
    {
      "format": "svg",
      "url": "https://cdn.assetforge.io/assets/job_1a2b3c4d5e6f/logo.svg",
      "size_bytes": 2456,
      "expires_at": "2025-09-01T12:00:00Z"
    },
    {
      "format": "png",
      "url": "https://cdn.assetforge.io/assets/job_1a2b3c4d5e6f/logo.png",
      "size_bytes": 8192,
      "width": 512,
      "height": 512,
      "expires_at": "2025-09-01T12:00:00Z"
    },
    {
      "format": "ico",
      "url": "https://cdn.assetforge.io/assets/job_1a2b3c4d5e6f/favicon.ico",
      "size_bytes": 1234,
      "expires_at": "2025-09-01T12:00:00Z"
    }
  ]
}
GET/jobs

List Jobs

Returns a paginated list of your generation jobs, ordered by creation date descending.

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoNumber of jobs to return. Default: 20, max: 100.
afterstringNoCursor for pagination (job ID).
statusstringNoFilter by status: queued, processing, complete, failed.
bash
curl "https://api.assetforge.io/v1/jobs?limit=10&status=complete" \
  -H "Authorization: Bearer af_live_xxxxxxxxxxxxxxxxxxxx"
DELETE/jobs/:id

Delete Job

Permanently deletes a job and its generated assets from the CDN. Returns 204 No Content on success.

bash
curl -X DELETE https://api.assetforge.io/v1/jobs/job_1a2b3c4d5e6f \
  -H "Authorization: Bearer af_live_xxxxxxxxxxxxxxxxxxxx"

Error Codes

All errors return a JSON body with a machine-readable code and a human-readable message.

HTTPCodeDescription
400invalid_requestMissing or malformed request body.
401unauthorizedInvalid or missing API key.
402quota_exceededMonthly generation quota reached.
404not_foundJob ID not found.
422generation_failedThe prompt could not be processed.
429rate_limitedToo many requests. Retry after the Retry-After header.
500internal_errorServer error. Retry with exponential backoff.