Getting started

API overview

Build and deploy web applications programmatically with the Macaly API

The Macaly API enables external applications to create chat sessions, build web applications with AI, and deploy them to production programmatically.

Base URL

https://www.macaly.com

Quick Start

  1. Get an API Key - See Authentication
  2. Create a Chat - Send a prompt to start building
  3. Poll for Completion - Wait for the AI to finish
  4. Deploy - Publish your app to production

Available Endpoints

MethodEndpointDescription
POST/api/chatCreate a new chat and start building
POST/api/chat/{chatId}/publishSend a message to an existing chat
POST/api/client-app/assets/uploadUpload a file and get a permanent CDN URL
GET/api/chat/{chatId}/statusPoll workflow status
GET/api/chat/{chatId}/subscribeSubscribe to real-time stream
POST/api/chat/{chatId}/deployDeploy chat to production
GET/api/chat/{chatId}/deploymentGet deployment status

Rate Limits and Credits

  • API requests consume credits from your team’s balance
  • Each chat creation costs the same as using the web interface
  • Failed API key attempts are rate limited (5 per minute per IP)
  • Monitor your usage in Settings → Usage & Limits

Error Handling

All errors return JSON with an error field:

{
  "error": "Error message here"
}

HTTP Status Codes

StatusDescription
400Bad Request - Invalid request body
401Unauthorized - Invalid or missing API key
402Payment Required - Insufficient credits
403Forbidden - No permission or wrong team
404Not Found - Resource not found
422Unprocessable Entity - Validation error
429Too Many Requests - Rate limited
500Internal Server Error - Server-side error
503Service Unavailable - Server is busy, try again later