> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Use the GraphQL API to manage Pods, templates, and Serverless endpoints programmatically.

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](https://graphql-spec.runpod.io/).

## Quick start

Make a request using cURL:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```graphql theme={"theme":{"light":"github-light","dark":"github-dark"}}
query {
  myself {
    id
    email
  }
}
```

## Common operations

<CardGroup cols={2}>
  <Card title="Manage Pods" href="/sdks/graphql/manage-pods" icon="server" horizontal>
    Create, start, stop, and query Pods.
  </Card>

  <Card title="Manage templates" href="/sdks/graphql/manage-pod-templates" icon="layer-group" horizontal>
    Create and manage Pod and Serverless templates.
  </Card>

  <Card title="Manage endpoints" href="/sdks/graphql/manage-endpoints" icon="bolt" horizontal>
    Create and configure Serverless endpoints.
  </Card>
</CardGroup>

## Common input fields

The following fields are commonly used when creating Pods and templates.

| Field                     | Type    | Description                                                                                                                                      |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `containerDiskInGb`       | Integer | Size of the container disk in GB. Used for the operating system, installed applications, and temporary data.                                     |
| `volumeInGb`              | Integer | Size of the persistent volume in GB. Data persists between Pod restarts.                                                                         |
| `imageName`               | String  | Docker image name including repository and tag (e.g., `nginx:latest`).                                                                           |
| `name`                    | String  | Name for the resource. Must be unique within your account.                                                                                       |
| `dockerArgs`              | String  | Overrides the container's default start command. If not specified, uses the image's CMD.                                                         |
| `env`                     | Array   | Environment variables as key-value pairs (e.g., `[{key: "VAR", value: "value"}]`).                                                               |
| `ports`                   | String  | Ports to expose, formatted as `port/protocol` (e.g., `8888/http,22/tcp`).                                                                        |
| `gpuTypeId`               | String  | GPU type identifier (e.g., `NVIDIA RTX A6000`). Use the `gpuTypes` query to list available options.                                              |
| `gpuCount`                | Integer | Number of GPUs to allocate.                                                                                                                      |
| `containerRegistryAuthId` | String  | ID of saved registry credentials for private container images. Find this in your [Runpod settings](https://www.runpod.io/console/user/settings). |
