๐ŸงฉCreate a Project (Brand Assets)

Projects let you save a reusable brand package (description, logo, and optional colors) and apply it to future outputs by passing the project ID in the projects array.

Before You Begin

  • Have your API token ready (Authorization: Bearer ...).

  • Prepare a project name and either a description or a website URL.

  • (Optional) Prepare a logo image as either a public URL (PNG/JPG) or a base64-encoded PNG/JPG.

  • (Optional) Pick brand colors as hex values like #111827.

Step 1: Create the Project

Create a project by calling POST /projects.

curl -X POST "https://api.autocontentapi.com/projects" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AI Startup Launch",
    "description": "Brand kit and positioning for our launch assets.",
    "imageUrl": "https://cdn.example.com/brand/logo.png",
    "textColor": "#111827",
    "backgroundColor": "#F9FAFB",
    "brandColor": "#4338CA",
    "accentColor": "#7C72EF"
  }'

The response includes the full project record, including its id:

Step 2: Request Parameters (All Fields)

The request body follows CreateProjectRequest:

Field
Required
Type
Notes

name

โœ…

string

Project name (max 200 characters).

description

โœ…*

string

Human-written project description. Markdown is supported. Either description or url must be provided.

url

โœ…*

string

Website URL for the project. If you provide url without description, the API fetches the site and generates a description automatically.

imageData

Optional

string

Base64-encoded PNG/JPG for the brand image. Any dimensions accepted; the API resizes it to 200x50 and stores the hosted copy as imageUrl. Cannot be combined with imageUrl.

imageUrl

Optional

string

Public HTTP/HTTPS URL to a PNG/JPG brand image. The API downloads it, resizes to 200x50, and hosts the optimized copy. Cannot be combined with imageData.

textColor

Optional

string

Hex color #RRGGBB used for branded text when applicable.

backgroundColor

Optional

string

Hex color #RRGGBB used for branded backgrounds when applicable.

brandColor

Optional

string

Hex color #RRGGBB used as the primary branding accent in supported outputs.

accentColor

Optional

string

Hex color #RRGGBB used as the secondary accent in supported outputs.

* Either description or url is required.

Uploading a logo via imageData

If you prefer to avoid hosting a logo yourself, send it as base64:

Step 3: Use the Project ID in Content Generation

Once created, apply the saved brand assets by including the project ID in projects when calling /content/Create:

Examples:

  • POST /projects โ€“ Create a project and store brand assets.

  • GET /projects โ€“ List your active projects.

  • GET /projects/{id} โ€“ Fetch a project by ID.

  • POST /projects/{id}/update โ€“ Update a project (including swapping/removing image and colors).

  • POST /projects/{id}/delete โ€“ Soft-delete a project (marks it inactive).

What's Next?

Last updated