← Back to Petal
Backends

Typed APIs. Real database.

Postgres, auth, storage, edge functions — provisioned and wired.

Petal Cloud gives every project a real Postgres database with row-level security, typed server functions, a storage bucket, and an AI gateway — no dashboards, no keys to copy.

Postgres

Not a toy DB

RLS

On by default

1 line

To call the server

Postgres with RLS

Tables, policies, migrations — versioned and safe by default.

Typed server functions

Call the server like a function. Petal handles auth, validation, errors.

AI gateway built in

Chat, images, embeddings — no third-party keys, no config.

Real code, not a mock

You own every line Petal writes.

No lock-in, no proprietary DSL. Petal writes production code you can read, edit, extend, and export at any time. Here's a taste of what lands in your project.

ts
export const topPosts = createServerFn({ method: "GET" })
  .handler(async () => {
    const { data } = await supabase
      .from("posts").select("*")
      .order("likes", { ascending: false }).limit(10);
    return data ?? [];
  });

Try backends now

Type an idea. Petal builds it live.

Free to start. No credit card required.