Schema (as TypeScript):
routes?:Route[];
version:3;
wildcard?:WildcardConfig;
typeConfig= {
Build Output Configuration
images?:ImagesConfig;
services?:Service[];
cache?:string[];
framework?:Framework;
};
overrides?:OverrideConfig;
crons?:CronsConfig;
Config Types:
The config.json file contains configuration information and metadata for a Deployment. The individual properties are described in greater detail in the sub-sections below.
At a minimum, a config.json file with a "version" property is required.
config.json supported properties
version
The version property indicates which version of the Build Output API has been implemented. The version described in this document is version 3.
The routes property describes the routing rules that will be applied to the Deployment. It uses the same syntax as the routes property of the vercel.json file.
Routes may be used to point certain URL paths to others on your Deployment, attach response headers to paths, and various other routing-related use-cases.
typeRoute=Source|Handler;
dest?:string;
src:string;
methods?:string[];
typeSource= {
continue?:boolean;
status?:number;
caseSensitive?:boolean;
missing?:HasField;
middlewarePath?:string;
locale?:Locale;
transforms?:Transform[];
mitigate?:Mitigate;
headers?:Record;
middlewareRawSrc?:string[];
headers
Specifies whether or not the route src should match with case sensitivity.
methods
If true, the route triggers handle: 'filesystem' and handle: 'rewrite'
Description
Required
No
continue
missing
Conditions of the HTTP request that must exist to apply the route.
caseSensitive
HasField
HasField
middlewarePath
middlewareRawSrc
A list containing the original routes used to generate the middlewarePath.
Mitigate
Locale
transforms
Transform[]
Source route: MatchableValue
typeMatchableValue= {
inc?:string[];
re?:string;
neq?:string;
gt?:number;
eq?:string|number;
pre?:string;
suf?:string;
};
ninc?:string[];
lt?:number;
gte?:number;
lte?:number;
Source route: HasField
typeHasField=Array<
| {
}
key:string;
value?:string|MatchableValue;
type:'header'|'cookie'|'query';
| { type:'host'; value:string|MatchableValue }
Key
Required for header, cookie, and query types. The key to match against.
type
The value to match against using string or MatchableValue conditions.
Determines the HasField type.
Required
"host" | "header" | "cookie" | "query"
Yes
key
value
Source route: Locale
typeLocale= {
Key
Cookie name that can override the Accept-Language header for determining the current locale.
Source route: Mitigate
An object of keys that represent locales to check for (en, fr, etc.) that map to routes to redirect to (/, /fr, etc.).
Yes
Required
action:'challenge'|'deny';
redirect
Key
typeMitigate= {
No
Description
cookie
};
"challenge" | "deny"
The action to take when the route is matched.
Required
action
Yes
Description
typeTransform=
| {
target: {
};
}
type:'request.headers'|'request.query'|'response.headers';
args?:string|string[];
key:string|Omit
| {
};
type:'request.path';
op:'set';
op:'append'|'set'|'delete';
args:string; // a single string; an array is rejected
Key
The operation to perform on the target. The request.path transform only supports set.
type
"request.headers" | "response.headers" | "request.query" | "request.path"
op
The target of the transform. Regular expression matching is not supported. Not used for request.path transforms.
{ key: string | Omit }
Yes
Yes
No
args
The arguments to pass to the transform. For request.path, this must be a single String that overrides the path the runtime observes (req.url). It must start with /, must not be scheme-relative, and must not contain a query string, whitespace, or control characters.
Handler route
The routing system has multiple phases. The handle value indicates the start of a phase. All following routes are only checked in that phase.
typeHandleValue=
|'miss'// check matches after every filesystem miss
|'resource'
|'hit'
handle:HandleValue;
|'filesystem'// check matches after the filesystem misses
typeHandler= {
};
status?:number;
src?:string;
dest?:string;
|'error'; // check matches after error (500, 404, etc.)
Type

A destination pathname or full URL, including querystring, with the ability to embed capture groups as $1, $2.
String- The following example shows a routing rule that will cause the /redirect path to perform an HTTP redirect to an external URL:
- Routing rule example
- "status":308,
- "routes": [
Description
A PCRE-compatible regular expression that matches each incoming pathname (excluding querystring).
String- A status code to respond with. Can be used in tandem with Location: header to implement redirects.
- No
- No
- "src":"/redirect",
The images property defines the behavior of Vercel's native Image Optimization API, which allows on-demand optimization of images at runtime.
hostname:string;
typeImageFormat='image/avif'|'image/webp';
pathname?:string;
protocol?:'http'|'https';
typeRemotePattern= {
};
search?:string;
};
typeLocalPattern= {
remotePatterns?:RemotePattern[];
pathname?:string;
search?:string;
port?:string;
qualities?:number[];
formats?:ImageFormat[];
minimumCacheTTL?:number; // seconds
};
domains:string[];
typeImagesConfig= {
sizes:number[];
remotePatterns
Allowed image qualities. Leave undefined to allow all possibilities, 1 to 100.
dangerouslyAllowSVG
Cache duration (in seconds) for the optimized images.
Description
Required
Allowed image widths.
domains
minimumCacheTTL
Change the Content Security Policy of the optimized images.
LocalPattern[]
localPatterns
qualities
RemotePattern[]
contentSecurityPolicy
Specifies the value of the "Content-Disposition" response header.
formats
No
ImageFormat[]
No
images example
The following example shows an image optimization configuration that specifies allowed image size dimensions, external domains, caching lifetime and file formats:
Our Services
"images": {
Digital Marketing
"formats": ["image/avif","image/webp"],
"sizes": [640,750,828,1080,1200],
"minimumCacheTTL":60,
"qualities": [25,50,75],
"localPatterns": [{
}]
"hostname":"^via\\.placeholder\\.com$",
"pathname":"^/assets/.*$",
"domains": [],
"remotePatterns": [{
"protocol":"https",
}]
}
"port":"",
"pathname":"^/1280x640/.*$",
"search":"?v=1"
"search":""
API
The API accepts the following query string parameters:
Key
The URL of the source image that should be optimized. Absolute URLs must match a pattern defined in the remotePatterns configuration.
Description
Required
Yes
Example
url
The width (in pixels) that the source image should be resized to. Must match a value defined in the sizes configuration.
wildcard supported properties
typeWildCard= {
domain:string;
Objects contained within the wildcard configuration support the following properties:
};
Required
typeWildcardConfig=Array;
domain
wildcard example
The value of the $wildcard match that will be available for routes to utilize.
{
},
{
},
"value":"en-US"
"wildcard": [
"domain":"example.com",
"domain":"example.nl",
],
}
"value":"nl-NL"
"routes": [
"domain":"example.fr",
"value":"fr"
The overrides property allows for overriding the output of one or more static files contained within the .vercel/output/static directory.
The main use-cases are to override the Content-Type header that will be served for a static file, and/or to serve a static file in the Vercel Deployment from a different URL path than how it is stored on the file system.
typeOverride= {
path?:string;
contentType?:string;
};
typeOverrideConfig=Record
overrides supported properties
Objects contained within the overrides configuration support the following properties:
Key
The value of the Content-Type HTTP response header that will be served with the static file.
overrides example
path
contentType
The following example shows an override configuration where an HTML file can be accessed without the .html file extension:
The cache property is an array of file paths and/or glob patterns that should be re-populated within the build sandbox upon subsequent Deployments.
Note that this property is only relevant when Vercel is building a Project from source code, meaning it is not relevant when building locally or when creating a Deployment from "prebuilt" build artifacts.
typeCache=string[];
"cache": [
".cache/**",
"node_modules/**"
]
The optional framework property is an object describing the framework of the built outputs.
This value is used for display purposes only.
typeFramework= {
version:string;
};
"framework": {
"version":"1.2.3"
}
typeCron= {
schedule:string;
typeCronsConfig=Cron[];
The optional crons property is an object describing the cron jobs for the production deployment of a project.
path:string;
}]
"crons": [{
"schedule":"0 0 * * *"
"path":"/api/cron",
The optional services property is an array of the service build targets in the deployment. When it is present, Vercel reads each service's build output from .vercel/output/services/
root:string;
name:string;
typeService= {
};
framework?:string;
type:'service';
entrypoint?:string;
runtime?:string;
service:string;
};
typeServiceBinding= {
env:string;
bindings?:ServiceBinding[];
format:'url';
name
Path to the service root, relative to the project root.
Key
The framework detected or configured for the service.
Yes
Required
ServiceBinding[]
framework
root
The runtime detected or configured for the service.
Yes
Description
entrypoint
No
runtime
The service entrypoint, relative to the service root.
bindings
No
No
No
"services": [
{
Digital Marketing
{
"name":"web",
"root":"web/",
"bindings": [
"type":"service",
}
]
"service":"api",
"format":"url",
"env":"API_URL"
},
{
}
"name":"api",
"root":"api/",
"entrypoint":"main:app"
]
Full config.json example
For an example of declaring services and the resulting build output, see the Services reference.
"routes": [
{
"version":3,
{
"src":"/redirect",
"status":308,
{
}
"headers": { "Location":"https://example.com/" }
"domains": [],
"src":"/blog",
"dest":"/blog.$wildcard.html"
"images": {
],
},
"sizes": [640,750,828,1080,1200],
"minimumCacheTTL":60,
"formats": ["image/avif","image/webp"],
}]
{
"localPatterns": [{
"qualities": [25,50,75],
"remotePatterns": [
}
"value":"nl-NL"
"protocol":"https",
},
{
"search":"?v=1"
"search":""
"port":"",
"domain":"example.com",
},
{
"value":"en-US"
},
"wildcard": [
"domain":"example.nl",
"value":"fr"
"cache": [".cache/**","node_modules/**"],
Build Output API- "schedule":"* * * * *"
- "version":"1.2.3"
- "blog.html": {
- "framework": {
],
Cross-link map: Build Output Configuration (/docs/build-output-api/configuration)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesProgrammatic Configuration with vercel.ts — Define your Vercel configuration in vercel.ts with @vercel/config for type-safe routing and build settings.Image Optimization with Vercel — Transform and optimize images to improve page load performance.Features — Learn how to implement common Vercel platform features through the Build Output API.Image — Optimize Images in your Next.js Application using the built-in next/image Component.Image Component — Optimize Images in your Next.js Application using the built-in next/image Component.PrerequisitesBuild Output API — The Build Output API is a file-system-based specification for a directory structure that can produce a Vercel deploymentThis page links to (8)Vercel Primitives — Learn about the Vercel platform primitives and how they work together to create a Vercel Deployment.Services — Learn how a deployment with multiple services is structured in the Build Output API.Cron Jobs — Learn about cron jobs, how they work, and how to use them on Vercel.Domains Overview — Learn the fundamentals of how domains, DNS, and nameservers work on Vercel.Image Optimization with Vercel — Transform and optimize images to improve page load performance.Static Configuration with vercel.json — Learn how to use vercel.json to configure and override the default behavior of Vercel from within your project.Vercel REST API Reference — Interact programmatically with your Vercel account using the SDK or direct HTTP requests.Service bindings — Call one service from another using caller-declared service bindings.Pages that link here (11)By site: vercel-web (1) · vercel-docs (10)From vercel-webNext.js 16.3 support on VercelFrom vercel-docsBuild Output API — The Build Output API is a file-system-based specification for a directory structure that can produce a Vercel deploymentFeatures — Learn how to implement common Vercel platform features through the Build Output API.Vercel Primitives — Learn about the Vercel platform primitives and how they work together to create a Vercel Deployment.Services — Learn how a deployment with multiple services is structured in the Build Output API.Cron Jobs — Learn about cron jobs, how they work, and how to use them on Vercel.Astro on Vercel — Deploy Astro sites to Vercel and configure server-side rendering, ISR, Web Analytics, Image Optimization, and Routing MiSvelteKit on Vercel — Deploy SvelteKit applications to Vercel and configure the adapter, rendering, streaming, ISR, analytics, and Routing MidImage Optimization with Vercel — Transform and optimize images to improve page load performance.Getting started with Image Optimization — Learn how you can leverage Vercel Image Optimization in your projects.Limits — Look up account limits, usage summaries, rate limits, and resource constraints for every Vercel plan.
- "path":"blog"
- "path":"/api/cron",
- "domain":"example.fr",
- Was this helpful?