Meet the new Netlify, where developers, agents, and now anyone with an idea build together. See what’s new.

Functions

Add real features to your app

Call an API, run an AI feature, take a payment, or kick off a background job. Write a function, deploy your app, and Netlify runs it.

  • Using the Netlify skills at netlify.ai, scaffold a Netlify Function with a typed config, a /api/hello path, and a JSON response.

  • Using the Netlify skills at netlify.ai, add a background function that generates a report and stores it in Netlify Blobs.

  • Using the Netlify skills at netlify.ai, add a scheduled function that emails a daily digest every morning.

What you can build

More than 700 million functions run on Netlify every day. Here’s the kind of work they power.

// Example: generate alt text with OpenAI
import OpenAI from "openai";

export default async (req: Request) => {
  const { description } = await req.json();
  const client = new OpenAI();

  const res = await client.responses.create({
    model: "gpt-5-mini",
    input: [
      { role: "user", content: `Write concise alt text for: ${description}` },
    ],
  });

  return Response.json({ altText: res.output_text });
};

export const config = { path: "/api/alt-text" };

Functions or Server?

Both run in your project and deploy with your app. Pick by how the work behaves.

Build with your agent, ship with confidence

Write a function, or let your agent write it, then deploy. It publishes with the rest of your app and goes live automatically. And you’re protected the whole way. Preview every change before it’s public, and roll back to any version in one click, so you can move fast without breaking what already works.

Functions works better with the rest of Netlify

Reach for these when a function needs to call a model, store a result, or check who’s signed in. They connect directly, with nothing extra to wire up.

Your app’s logic has a home

Write it and publish it without thinking about the infrastructure underneath.

Frequently asked questions

What is Netlify Functions?

Backend code that runs in your Netlify project without a server to manage: API endpoints, webhooks, background jobs, and scheduled tasks.

What’s the difference between a regular function, a background function, and a scheduled function?

Regular functions respond to a request and finish quickly. Background functions run for up to 15 minutes and respond immediately while the job continues. Scheduled functions run on a cron schedule. For longer than 15 minutes, or connections that stay open, use Server.

When should I use Netlify Server instead of Functions?

Use Server for open connections like WebSockets, work that runs for minutes or hours, or an existing Node app. Use Functions for work that starts, finishes, and is done. They run in the same project, so you can use both.

Can my AI coding agent configure Functions?

Yes. Region, memory, and event handlers are all set in code, so your agent can read and change them like the rest of your project.

How does pricing work?

Functions is available on all Netlify plans. Memory and vCPU configuration (up to 4 GB / 2 vCPUs) is available on credit-based plans. See pricing →