Overview
The Projects API allows you to create, delete, and manage Polaris IDE projects programmatically. Projects are containers for files and conversations.Create Project
Create a new empty project
Request Body
The name of the project
Response
The unique ID of the created project
Whether usage was successfully tracked in Autumn
Current number of projects created
Maximum number of projects allowed (10 for free, unlimited for Pro)
Example Request
cURL
JavaScript
Example Response
Success
Limit Reached
Error Codes
400- Missing or invalid project name401- Unauthorized (missing/invalid token)403- Project limit reached500- Server error
Delete Project
Delete an existing project and all its files
Query Parameters
The ID of the project to delete
Response
Always
true on successful deletionConfirmation message
Example Request
cURL
JavaScript
Example Response
Success
Error Codes
400- Missing project ID401- Unauthorized500- Server error
Generate Project
Generate a project from an AI description using background jobs
Request Body
Natural language description of the project to generate (minimum 10 characters)
Optional custom name for the project. Defaults to “Generated Project “
Response
Always
true on successful triggerThe ID of the created project
The Trigger.dev background job run ID for tracking generation progress
Example Request
cURL
JavaScript
Example Response
Success
Error Codes
400- Invalid description (too short)401- Unauthorized403- Project limit reached500- Server error or billing configuration issue
Project generation runs asynchronously via Trigger.dev. Use the
runId to track progress, or monitor the project’s generation events in the UI.Check Project Limit
Check if user can create more projects
Response
Whether the user can create more projects
Current number of projects
Maximum allowed projects (10 for free tier)
If
true, the check proceeded without Autumn validation (allows creation)Example Request
cURL
JavaScript
Example Response
Allowed
Limit Reached
Import from GitHub
Import a GitHub repository as a new project
Request Body
Full GitHub repository URL (e.g.,
https://github.com/owner/repo)Response
Always
true on successful importThe ID of the created project
Example Request
cURL
JavaScript
Example Response
Success
Error Codes
400- Invalid GitHub URL401- Unauthorized403- GitHub not connected or project limit reached500- Import failed
Export to GitHub
Export a project to a GitHub repository
Request Body
The ID of the project to export
Target GitHub repository URL
Commit message for the push. Defaults to “Update from Polaris”
Create repository if it doesn’t exist. Defaults to
falseMake new repository private (only used if creating). Defaults to
trueDescription for new repository (only used if creating)
Response
Always
true on successful exportExample Request
cURL
JavaScript
Example Response
Success
Error Codes
400- Invalid GitHub URL or missing project ID401- Unauthorized403- GitHub not connected404- Repository doesn’t exist (whencreateIfNotExistsisfalse)500- Export failed or repository creation failed
Export status is tracked on the project. Monitor
exportStatus field in the project data to see progress (“exporting”, “completed”, “failed”).GitHub Connection Status
Check GitHub OAuth connection status
Whether user has connected GitHub account
GitHub username (only if connected)
Error message if connection invalid
cURL
JavaScript
Usage Tracking
All project operations (create, generate, import) automatically track usage via Autumn (Stripe):- Creating a project:
+1to usage count - Deleting a project:
-1from usage count - Free tier: Limited to 10 projects
- Pro tier: Unlimited projects
Next Steps
Files API
Manage files within projects
Messages API
Add AI conversations to projects