# BuildItOmi API > Omi can build anything. Create, build, publish and run full-stack apps from a prompt over HTTPS + JSON. Base URL: https://api.builditomi.com/v1 Auth: Authorization: Bearer bio_... (create keys at https://api.builditomi.com/keys) Pricing (the API's own plans and credits, USD): free sandbox of 10,00,000 credits; Starter $9/mo (4,00,00,000 credits), Pro $29/mo (15,00,00,000), Scale $99/mo (60,00,00,000); packs $5 (2,00,00,000) and $20 (10,00,00,000), never expire. Each call uses 1,000 credits, plus the real AI cost of builds and AI calls. https://api.builditomi.com/pricing SDKs: npm install builditomi (JavaScript, Node 18+) and pip install builditomi (Python 3.8+). new BuildItOmi() / BuildItOmi() reads BUILDITOMI_KEY; omi.apps.create(prompt), omi.apps.build(id), omi.apps.publish(id). White-label: apps created or published with an API key show no BuildItOmi branding; connect a customer's domain with POST /v1/apps/{id}/domain. Guide: https://api.builditomi.com/guides/app-builder ## Scopes - apps:read: List apps, read an app, its versions and build progress. - apps:write: Create apps from a prompt, change them, run builds, restore versions, publish and unpublish. - code:read: Read every source file and download the project as a ZIP. - data:read: Read the records in an app's database. - data:write: Add, change and delete records in an app's database. - secrets:write: List, add and remove an app's server secrets (values are never returned). - domains:write: Connect and disconnect an app's custom domain. - ai: Call the built-in AI (billed at its real model cost in credits). - usage:read: See credits, plan usage and each key's calls. - webhooks: Set, test and remove the account's webhook. ## Apps Create an app from a prompt, then run its build. Builds run in steps so no request runs longer than 60 seconds: call /step (JSON) or /stream (live events) until done is true. - GET /v1/apps [apps:read]: Your apps, newest first (up to 100), with your plan usage. - POST /v1/apps [apps:write]: Starts building a new app from a prompt. Apps and websites are React projects; pass "stack": "html" for a single HTML file. Returns at once: then run the build with /step or /stream. Body: {"prompt":"A booking app for my salon with stylists, time slots and reminders"} - GET /v1/apps/{id} [apps:read]: Title, versions, whether it is building or published, and the chat history. - PATCH /v1/apps/{id} [apps:write]: Changes the app's title. Body: {"title":"Salon Bookings"} - POST /v1/apps/{id}/step [apps:write]: Runs up to ~48 seconds of the build or change and returns. Call it again until done is true. - POST /v1/apps/{id}/stream [apps:write]: Same as /step, as Server-Sent Events: progress shows what each AI agent is doing while the step runs. The last event is done, continue (call again) or error. - DELETE /v1/apps/{id}/step [apps:write]: Stops the running build or change. Work so far is kept. - POST /v1/apps/{id}/edit [apps:write]: Asks Omi to change the app in plain words, like in the chat. Then run /step or /stream until done. Body: {"message":"Add a contact form and send me an email for each message"} - GET /v1/apps/{id}/versions [apps:read]: Every version with the message that made it. - POST /v1/apps/{id}/versions [apps:write]: Makes an earlier version the newest one. Body: {"version":3} - POST /v1/apps/{id}/publish [apps:write]: Puts the current version online at its link (and custom domain, if connected). - DELETE /v1/apps/{id}/publish [apps:write]: Takes the app offline. Its data and versions stay. ## Code Your code is yours. Read every file as JSON or download the whole project as a ZIP. - GET /v1/apps/{id}/source?files=1 [code:read]: Every source file of the project. Without ?files=1 you get the built page as text/html. - GET /v1/apps/{id}/source?download=zip [code:read]: The whole project as a .zip: every source file plus the built page. ## Data Read and write an app's database as its owner. Records are JSON objects up to 20 KB; fields starting with _ and id, createdAt, updatedAt are set by the server. Writes count toward your plan's record limit. - GET /v1/apps/{id}/records [data:read]: The app's collections and its total record count. - GET /v1/apps/{id}/records/{collection}?limit=50 [data:read]: Newest first, up to 200 per page (default 50). Page with ?before=. Filter with ?where={"status":"paid"} (up to 3 fields, exact match). - GET /v1/apps/{id}/records/{collection}?id=a1B2c3 [data:read]: One record by its id. - POST /v1/apps/{id}/records/{collection} [data:write]: Adds a record. Anyone watching the app sees it live. Body: {"name":"Asha","slot":"10:30","stylist":"Ravi"} - PATCH /v1/apps/{id}/records/{collection}?id=a1B2c3 [data:write]: Merges the fields you send into the record. Body: {"slot":"11:00"} - DELETE /v1/apps/{id}/records/{collection}?id=a1B2c3 [data:write]: Deletes one record. ## Secrets Server secrets are API keys your app calls other services with. Values are encrypted and never returned: only the name, host and last 4 characters. - GET /v1/apps/{id}/keys [secrets:write]: Names, hosts and last 4 characters. - POST /v1/apps/{id}/keys [secrets:write]: Saves a secret the app can use only when calling this host. Up to 20 per app. Body: {"name":"OPENWEATHER_KEY","value":"","host":"api.openweathermap.org"} - DELETE /v1/apps/{id}/keys?name=OPENWEATHER_KEY [secrets:write]: Deletes a secret by name. ## Domains Connect your own domain to a published app. Add the DNS records the status lists at your registrar; HTTPS is set up for you. - GET /v1/apps/{id}/domain [domains:write]: The connected domain, the DNS records it needs and whether they are found. - POST /v1/apps/{id}/domain [domains:write]: Connects a domain (replacing any connected one). Body: {"domain":"book.mysalon.com"} - DELETE /v1/apps/{id}/domain [domains:write]: Removes the custom domain. The app's own link keeps working. ## AI gateway The same built-in AI your apps use, from your own code. No model keys to manage. "fast" (default) is the cheaper model, "standard" the stronger one. Each call is billed at its real model cost in credits, shown in usage.credits. - POST /v1/ai/chat [ai]: Send messages (ending with a user message), get a reply. Up to 24,000 characters in and 2,048 tokens out. Set json: true for a JSON answer. Body: {"model":"fast","system":"You write short product descriptions.","messages":[{"role":"user","content":"A handmade clay mug, 350 ml, blue glaze"}],"max_tokens":300} ## Usage and credits The API has its own plan and credits (api.builditomi.com/pricing). Check them before a big job. - GET /v1/usage [usage:read]: Your API plan, credits left, and credits spent per day split into plain calls, AI work and build time (?days= up to 31). Credits are in the same units the site shows. - GET /v1/usage/keys [usage:read]: Each key's calls and credits per day and per endpoint, for the last 14 days (?days= up to 31). ## Webhooks Get a POST when a build finishes, fails, or an app is published or unpublished: no polling. One webhook per account, https only. Each request is signed (see Verify a webhook). - GET /v1/webhooks [webhooks]: The URL, its events and the last delivery. - PUT /v1/webhooks [webhooks]: Saves the URL and events. The signing secret is returned in full only here; it stays the same when you change the URL. Body: {"url":"https://example.com/hooks/builditomi","events":["build.completed","build.failed","app.published"]} - POST /v1/webhooks/test [webhooks]: Sends a signed sample build.completed event and says what your endpoint answered. - DELETE /v1/webhooks [webhooks]: Stops all deliveries. Docs: https://api.builditomi.com/docs