DeployzyDeployzy
DocsAPI ReferenceAI Builder & Agent

AI Builder & Agent

Generate, deploy, edit, and manage apps with natural language.

Deployzy's AI builder turns a plain-English prompt into a real, deployed app, and the AI agent answers questions about your account and takes actions on it. All endpoints authenticate with a deploy-scoped API key (X-API-Key: sm_live_...) and require a verified email.

Build an app from a prompt

code
POST /api/v1/ai/build
json
{ "generator": "web", "prompt": "an e-commerce store for handmade candles with an admin panel", "subdomain": "candles" }

Generators:

GeneratorWhat it builds
webA full-stack website — served pages at / plus its API and an /admin panel
apiA headless JSON API / microservice
telegram-botA Telegram bot (long-polling)
discord-botA Discord bot
workerA background / scheduled worker
portfolio, landingSchema-filled static sites

The code-gen generators write real TypeScript/Python, build via a Dockerfile, and self-repair from build logs. The response is 202 Accepted with the project and live URL; if the app needs secrets or a database it returns a needs_setup payload listing them — supply them to /ai/deploy.

Finish a build that needs setup

code
POST /api/v1/ai/deploy
json
{ "project_id": "...", "env": { "OPENAI_API_KEY": "sk-..." }, "database": "postgres" }

Edit an already-deployed AI project

code
POST /api/v1/ai/edit
json
{ "project_id": "...", "instruction": "add a /health endpoint and a dark mode toggle" }

Regenerates the changed files and redeploys with the same self-repair loop.

The agent (tool-calling)

code
POST /api/v1/ai/agent
json
{ "messages": [ { "role": "user", "content": "which of my projects are failing and why?" } ] }

The agent reasons in a loop and calls real tools scoped to your account — listing projects, reading deploy logs, checking account status, building & editing apps, deploying a GitHub repo or a template, managing env vars and databases, and searching the docs. The response is { reply, steps[] } where steps is the full trace of tools it ran.

Streaming the agent (SSE)

code
POST /api/v1/ai/agent/stream

Same body as /ai/agent. Returns a text/event-stream with events: step / step_done (live tool calls), token (streamed reply), note (the agent narrating a fix), build_log + build_status (live build & self-repair output), and done.

Rate-limited per account. A single request builds exactly one project — the agent won't spawn duplicates.

Usage & billing

AI builder, agent, and email verification all draw from one prepaid balance, priced in dollars (pay-as-you-go). Each plan includes a monthly usage allowance that resets each month; beyond it you spend from your top-up balance, which carries over. See your balance, per-product breakdown, and history on the Billing page, and add funds there (card or crypto).

Bring your own AI key (BYOK)

Save your own AI provider key on the API Keys page → "Bring your own AI key". When set, the agent and AI builder run on your key and those calls are not billed to your Deployzy balance. Supported providers: Anthropic, OpenAI, Google (Gemini), xAI, DeepSeek, Moonshot (Kimi), Groq, Mistral. Pick which engine to use (Deployzy's included one, or your key) right in the agent composer. Without a key, Deployzy's key is used and usage is metered normally. Keys are stored encrypted and never shown in full.