Serverless indexes do not support collections.

```python Python theme={null}
# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="API_KEY")
pc.create_collection("example-collection", "docs-example")
```

```javascript JavaScript theme={null}
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone'

const pc = new Pinecone({
  apiKey: 'YOUR_API_KEY'
});

await pc.createCollection({
  name: "example-collection",
  source: "docs-example",
});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

public class CreateCollectionExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();

        pc.createCollection("example-collection", "docs-example");
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v2/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    collection, err := pc.CreateCollection(ctx, &pinecone.CreateCollectionRequest{
        Name: "example-collection", 
        Source: "docs-example",
    })
    if err != nil {
        log.Fatalf("Failed to create collection: %v", err)
    } else {
        fmt.Printf("Successfully created collection: %v", collection.Name)
    }
}
```

```csharp C# theme={null}
using Pinecone;

var pinecone = new PineconeClient("YOUR_API_KEY");

var collectionModel = await pinecone.CreateCollectionAsync(new CreateCollectionRequest {
    Name = "example-collection",
    Source = "docs-example",
});
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s "https://api.pinecone.io/collections" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2024-07" \
  -d '{
        "name": "example-collection",
        "source": "docs-example"
  }'
```

`POST /collections`

:::code-group
```bash title="cURL"
curl --request POST \
  --url https://api.pinecone.io/collections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "source": "example-source-index"
}'
```

```json title="201"
{
  "name": "example-collection",
  "size": 10000000,
  "status": "Initializing",
  "dimension": 1536,
  "vector_count": 120000,
  "environment": "us-east1-gcp"
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Body

- `name` (body, string, required) — The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
- `source` (body, string, required) — The name of the index to be used as the source for the collection.

## Response

- `201` — The collection has been successfully created.
- `400` — Bad request. The request body included invalid request parameters.
- `401` — Unauthorized. Possible causes: Invalid API key.
- `403` — You've exceed your collections quota.
- `409` — Collection of given name already exists.
- `422` — Unprocessable entity. The request body could not be deserialized.
- `500` — Internal server error.

## Related pages

- [Create a backup of an index](./database-2026-07-control-plane-create-backup.md)
- [List backups for all indexes in a project](./database-2026-07-control-plane-list-project-backups.md)
- [List backups for an index](./database-2026-07-control-plane-list-index-backups.md)
- [Describe a backup](./database-2026-07-control-plane-describe-backup.md)
- [Delete a backup](./database-2026-07-control-plane-delete-backup.md)
- [Create an index from a backup](./database-2026-07-control-plane-create-index-from-backup.md)
- [List restore jobs](./database-2026-07-control-plane-list-restore-jobs.md)
- [Describe a restore job](./database-2026-07-control-plane-describe-restore-job.md)
- [List collections](./database-2026-07-control-plane-list-collections.md)
- [Create a collection](./database-2026-07-control-plane-create-collection.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
