Skip to main content
Use the GraphQL API to manage Pods, templates, and Serverless endpoints through queries and mutations. All requests go to https://api.runpod.io/graphql with your API key included as a query parameter. For the complete schema including all available queries, mutations, fields, and inputs, see the GraphQL Spec.

Quick start

Make a request using cURL:
curl --request POST \
  --header 'content-type: application/json' \
  --url 'https://api.runpod.io/graphql?api_key=YOUR_API_KEY' \
  --data '{"query": "query { myself { id email } }"}'
Or use a GraphQL client:
query {
  myself {
    id
    email
  }
}

Common operations

Manage Pods

Create, start, stop, and query Pods.

Manage templates

Create and manage Pod and Serverless templates.

Manage endpoints

Create and configure Serverless endpoints.

Common input fields

The following fields are commonly used when creating Pods and templates.
FieldTypeDescription
containerDiskInGbIntegerSize of the container disk in GB. Used for the operating system, installed applications, and temporary data.
volumeInGbIntegerSize of the persistent volume in GB. Data persists between Pod restarts.
imageNameStringDocker image name including repository and tag (e.g., nginx:latest).
nameStringName for the resource. Must be unique within your account.
dockerArgsStringOverrides the container’s default start command. If not specified, uses the image’s CMD.
envArrayEnvironment variables as key-value pairs (e.g., [{key: "VAR", value: "value"}]).
portsStringPorts to expose, formatted as port/protocol (e.g., 8888/http,22/tcp).
gpuTypeIdStringGPU type identifier (e.g., NVIDIA RTX A6000). Use the gpuTypes query to list available options.
gpuCountIntegerNumber of GPUs to allocate.
containerRegistryAuthIdStringID of saved registry credentials for private container images. Find this in your Runpod settings.