Vercel

Remote Cache API

OpenAPI specification for self-hosted Remote Cache servers.

Remote Cache API

The Turborepo Remote Cache API defines the HTTP interface that any remote cache server must implement to be compatible with Turborepo.

Overview

The remote cache stores build artifacts identified by content-addressable hashes. When Turborepo encounters a task that matches a previously cached result, it can download the artifact instead of re-executing the task.

Authentication

All endpoints require Bearer token authentication:

Authorization: Bearer <token>

For self-hosted implementations, the token format and validation logic is up to the implementer.

Endpoints

Artifacts

MethodPathDescription
GET/artifacts/statusCheck remote caching status
HEAD/artifacts/{hash}Check if artifact exists
GET/artifacts/{hash}Download a cache artifact
PUT/artifacts/{hash}Upload a cache artifact
POST/artifactsQuery information about multiple artifacts

Analytics

MethodPathDescription
POST/artifacts/eventsRecord cache usage events

Download the spec

The full OpenAPI specification is available at /api/remote-cache-spec.