API Reference
Base URL: https://api.getaipage.com/api/v1
Authentication
All endpoints require Authorization: Bearer <access_token> unless marked public.
Projects
POST /projects/genai
Queue AI project generation. Returns immediately with a task ID.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
framework_id | uuid | ✓ | Published framework to use |
name | string | ✗ | Override project name |
genai_prompt | string | ✓ | JSON-encoded prompt (see below) |
genai_prompt fields
| Field | Description | Example |
|---|---|---|
page_goal | What the page should achieve | generate-leads |
target_audience | Who the page is for | b2b |
content_type | Product / service category | digital-product |
page_name | Product or project name | "My SaaS" |
page_description | Full description | "An AI tool that…" |
Response 202 Accepted
{
"task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "PENDING",
"message": "Project generation task accepted"
}
GET /projects/
List the authenticated user's projects.
GET /projects/{id}
Get a single project by ID.
Tasks
GET /tasks/{task_id}
Poll the status of any queued task.
Response
{
"id": "uuid",
"task_type": "PROJECT_GENAI",
"status": "SUCCESS",
"result": {
"project_id": "uuid",
"framework_id": "uuid"
},
"error_message": null
}
Status values: PENDING → IN_PROGRESS → SUCCESS / FAILED
Billing
GET /billing/plans (public)
Returns available plans filtered by country.
| Query param | Type | Description |
|---|---|---|
country | string | ISO 3166-1 alpha-2 (e.g. IN, US) |
GET /billing/limits
Returns the authenticated user's project and page limits.
Error Responses
All errors follow:
{
"detail": "Human-readable error message"
}
| Status | Meaning |
|---|---|
400 | Bad request — invalid payload |
401 | Unauthenticated |
403 | Forbidden — insufficient permissions |
404 | Resource not found |
422 | Validation error |
500 | Server error |