Preview

Preview — not covered by SemVer

The preview namespace exposes pre-release API features. Signatures, behavior, and availability may change in any minor SDK release without notice. Pin your SDK version when relying on preview features. Preview features are not subject to the SDK’s normal deprecation policy.

Access via pc.preview on a Pinecone instance, or pc.preview on an AsyncPinecone instance.

Preview (sync)

class pinecone.preview.Preview(http, config)[source]

Bases: object

Sync preview namespace — routes to per-area preview classes.

Preview

Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • http (HTTPClient) – Shared HTTP client from the parent Pinecone instance.

  • config (PineconeConfig) – SDK configuration shared with the parent client.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> info = pc.preview.indexes.describe("articles-en-preview")
>>> print(info.host)
__init__(http, config)[source]
Parameters:
  • http (HTTPClient)

  • config (PineconeConfig)

Return type:

None

close()[source]

Close preview sub-clients. Idempotent.

Preview

Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> index = pc.preview.index(name="articles-en-preview")
>>> pc.preview.close()

Or use the parent client as a context manager, which closes preview automatically:

>>> with Pinecone(api_key="your-api-key") as pc:
...     index = pc.preview.index(name="articles-en-preview")
Return type:

None

index(*, name=None, host=None)[source]

Get a PreviewIndex for data-plane operations.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Exactly one of name or host must be provided. When name is given, the host is resolved via describe() and the result is cached on this Preview instance so subsequent calls with the same name avoid an extra control-plane round-trip.

Parameters:
  • name (str | None) – Index name. The host is resolved and cached via preview.indexes.describe(name).host.

  • host (str | None) – Data-plane host URL. Passed through directly without a control-plane call.

Returns:

PreviewIndex connected to the resolved host.

Raises:
  • PineconeValueError – If neither or both of name and host are provided.

  • NotFoundError – If name is given but the index does not exist.

  • ApiError – If the describe call returns an error response.

Return type:

PreviewIndex

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> index = pc.preview.index(name="articles-en-preview")

Or pass a host directly to skip the control-plane call:

>>> index = pc.preview.index(host="https://articles-en-preview-xyz.pinecone.io")
property indexes: PreviewIndexes

Access the preview indexes control-plane namespace.

Lazily instantiated on first access. Reuses the parent client’s configuration and credentials.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Returns:

PreviewIndexes instance.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> info = pc.preview.indexes.describe("articles-en-preview")
>>> print(info.host)

PreviewIndexes

class pinecone.preview.indexes.PreviewIndexes(config)[source]

Bases: object

Control-plane operations for preview indexes (2026-01.alpha).

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Access via pc.preview.indexes.

Parameters:

config (PineconeConfig) – SDK configuration used to construct an HTTP client targeting the preview API version.

__init__(config)[source]
Parameters:

config (PineconeConfig)

Return type:

None

close()[source]

Close the underlying HTTP client. Idempotent.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Return type:

None

configure(name, *, schema=None, deletion_protection=None, tags=None, read_capacity=None)[source]

Update configuration of an existing preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Only the fields you provide are updated; omitted parameters are left unchanged on the server.

Parameters:
  • name (str) – Name of the preview index to configure.

  • schema (dict[str, Any] | None) –

    Updated schema definition. Pass a dict with a "fields" key mapping field names to typed field definitions. The server only allows additive changes — it rejects requests that remove or modify existing fields. Example:

    pc.preview.indexes.configure(
        "my-index",
        schema={"fields": {
            "summary": {"type": "string", "full_text_search": {}},
        }},
    )
    

  • deletion_protection (str | None) – "enabled" to prevent accidental deletion; "disabled" to allow it.

  • tags (dict[str, str] | None) – Replacement set of key-value tags for the index. Keys must be at most 80 characters; values at most 120 characters.

  • read_capacity (dict[str, Any] | None) – Updated read capacity configuration dict. Must include a "mode" key ("OnDemand" or "Dedicated").

Returns:

PreviewIndexModel reflecting the updated index state.

Raises:
  • PineconeValueError – If name is empty; if all kwargs are None; if schema, tags, or read_capacity is an empty dict; or if a tag key/value exceeds the length limit.

  • ApiError – If the API returns an error response.

Return type:

PreviewIndexModel

Examples

pc.preview.indexes.configure(
    "my-index",
    schema={"fields": {"summary": {"type": "string"}}},
)

Update read capacity to dedicated:

pc.preview.indexes.configure(
    "my-index",
    read_capacity={"mode": "Dedicated", "node_type": "b1",
                   "scaling": "Manual",
                   "manual": {"shards": 2, "replicas": 1}},
)

Update tags:

pc.preview.indexes.configure(
    "my-index",
    tags={"env": "prod", "team": "search"},
)

Enable deletion protection:

pc.preview.indexes.configure("my-index", deletion_protection="enabled")
create(*, schema, name=None, deployment=None, read_capacity=None, deletion_protection=None, tags=None)[source]

Create a new preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • schema (dict[str, Any]) –

    Index schema definition. A dict with a "fields" key mapping field names to their typed field definitions. Example:

    {
        "fields": {
            "embedding": {"type": "dense_vector", "dimension": 1536},
            "title": {"type": "string", "full_text_search": {}},
        }
    }
    

  • name (str | None) – Optional name for the index. If omitted, the API assigns one.

  • deployment (dict[str, Any] | None) – Optional deployment configuration dict. Must include a "deployment_type" key (e.g. "managed", "pod", "byoc"). When omitted the API uses its default deployment.

  • read_capacity (dict[str, Any] | None) – Optional read capacity configuration dict. Must include a "mode" key ("OnDemand" or "Dedicated"). When omitted the API uses on-demand mode.

  • deletion_protection (str | None) – Optional deletion-protection setting — "enabled" or "disabled". Defaults to "disabled" if not provided.

  • tags (dict[str, str] | None) – Optional key-value tags for the index. Keys must be at most 80 characters; values must be at most 120 characters.

Returns:

PreviewIndexModel describing the newly created index. The returned model’s status.ready may be False — use describe() to poll until the index is ready.

Raises:
  • PineconeValueError – If a tag key exceeds 80 characters or a tag value exceeds 120 characters.

  • ApiError – If the API returns an error response.

Return type:

PreviewIndexModel

Examples

pc.preview.indexes.create(
    schema={"fields": {"embedding": {"type": "dense_vector", "dimension": 1536}}},
    name="my-preview-index",
)
create_backup(index_name, *, name=None, description=None)[source]

Create a backup of a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • index_name (str) – Name of the index to back up.

  • name (str | None) – Optional user-defined name for the backup.

  • description (str | None) – Optional description providing context for the backup.

Returns:

PreviewBackupModel describing the newly created backup. The status field will typically be "Initializing" immediately after creation. Poll describe_backup() until status == "Ready" before using the backup:

backup = pc.preview.indexes.create_backup("my-index", name="nightly")
# Poll until ready
import time
while backup.status != "Ready":
    time.sleep(5)
    backup = pc.preview.indexes.describe_backup(backup.backup_id)

Raises:
Return type:

PreviewBackupModel

Examples

pc.preview.indexes.create_backup("my-index")

pc.preview.indexes.create_backup(
    "my-index", name="nightly", description="Daily backup"
)
delete(name, *, timeout=None)[source]

Delete a named preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Sends a DELETE request and, depending on timeout, polls until the index disappears.

Parameters:
  • name (str) – Name of the preview index to delete.

  • timeout (int | None) –

    Controls post-delete polling behaviour.

    • None (default): poll describe() every 5 seconds with no upper bound until the index is gone.

    • -1: return immediately after the DELETE response without polling.

    • Positive integer: poll until the index is gone or timeout seconds have elapsed. Raises PineconeTimeoutError if the deadline is reached before the index disappears.

Returns:

None

Raises:
Return type:

None

Examples

pc.preview.indexes.delete("my-preview-index")

# Delete and wait up to 60 seconds
pc.preview.indexes.delete("my-preview-index", timeout=60)

# Delete without polling
pc.preview.indexes.delete("my-preview-index", timeout=-1)
describe(name)[source]

Get detailed information about a named preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:

name (str) – Name of the preview index to describe.

Returns:

PreviewIndexModel with name, host, schema, deployment, read_capacity, status, deletion_protection, and tags.

Raises:
Return type:

PreviewIndexModel

Examples

desc = pc.preview.indexes.describe("my-preview-index")
print(desc.host)
exists(name)[source]

Check whether a named preview index exists.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Uses describe() internally; catches NotFoundError and returns False.

Parameters:

name (str) – Name of the preview index to check.

Returns:

True if the index exists, False if it does not.

Raises:
Return type:

bool

Examples

if pc.preview.indexes.exists("my-preview-index"):
    print("Index found")
list(*, limit=None, pagination_token=None)[source]

List all preview indexes.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

The 2026-01.alpha server returns all indexes in a single page. The returned Paginator always yields exactly one page and then terminates, but the paginator interface is used for consistency with other list methods and forward compatibility.

Parameters:
  • limit (int | None) – Maximum number of items to yield across all pages. Must be a positive integer. None yields all items.

  • pagination_token (str | None) – Token to resume pagination from a previous call. None starts from the beginning.

Returns:

Paginator over PreviewIndexModel instances.

Raises:
Return type:

Paginator[PreviewIndexModel]

Examples

for index in pc.preview.indexes.list():
    print(index.name)

Access page-level metadata:

for page in pc.preview.indexes.list().pages():
    print(f"Got {len(page.items)} indexes")
    for index in page.items:
        print(index.name)
list_backups(index_name, *, limit=None, pagination_token=None)[source]

List backups for a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • index_name (str) – Name of the index whose backups to list.

  • limit (int | None) – Maximum number of backups to yield across all pages. Must be a positive integer. None yields all backups.

  • pagination_token (str | None) – Token to resume pagination from a previous call. None starts from the beginning.

Returns:

Paginator over PreviewBackupModel instances.

Raises:
Return type:

Paginator[PreviewBackupModel]

Examples

for backup in pc.preview.indexes.list_backups("my-index"):
    print(backup.backup_id, backup.status)

Access page-level metadata:

for page in pc.preview.indexes.list_backups("my-index").pages():
    print(f"Got {len(page.items)} backups")
    for backup in page.items:
        print(backup.backup_id)

PreviewIndex

class pinecone.preview.index.PreviewIndex(host, config)[source]

Bases: object

Data-plane wrapper for a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Obtain via pc.preview.index(name=...) or pc.preview.index(host=...).

Parameters:
  • host (str) – Normalized data-plane host URL for this index.

  • config (PineconeConfig) – SDK configuration shared with the parent client.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> with pc.preview.index(name="articles-en-preview") as index:
...     response = index.documents.upsert(
...         namespace="articles-en",
...         documents=[{"_id": "doc-1", "title": "Introduction to vectors"}],
...     )

Explicit open/close when a context manager is not convenient:

>>> index = pc.preview.index(host="https://my-index.svc.pinecone.io")
>>> try:
...     response = index.documents.upsert(
...         namespace="articles-en",
...         documents=[{"_id": "doc-1", "title": "Introduction to vectors"}],
...     )
... finally:
...     index.close()
__init__(host, config)[source]
Parameters:
  • host (str)

  • config (PineconeConfig)

Return type:

None

close()[source]

Close the underlying HTTP client. Idempotent.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> index = pc.preview.index(host="https://my-index.svc.pinecone.io")
>>> index.close()
Return type:

None

property host: str

Data-plane host URL for this index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> index = pc.preview.index(host="https://my-index.svc.pinecone.io")
>>> print(index.host)
https://my-index.svc.pinecone.io

Preview (async)

class pinecone.preview.AsyncPreview(http, config)[source]

Bases: object

Async preview namespace — routes to per-area async preview classes.

Preview

Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • http (AsyncHTTPClient) – Shared async HTTP client from the parent AsyncPinecone instance.

  • config (PineconeConfig) – SDK configuration shared with the parent client.

Examples

>>> import asyncio
>>> from pinecone import AsyncPinecone
>>> async def main():
...     pc = AsyncPinecone(api_key="your-api-key")
...     info = await pc.preview.indexes.describe("articles-en-preview")
...     print(info.host)
>>> asyncio.run(main())
__init__(http, config)[source]
Parameters:
  • http (AsyncHTTPClient)

  • config (PineconeConfig)

Return type:

None

async close()[source]

Close async preview sub-clients. Idempotent.

Preview

Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> import asyncio
>>> from pinecone import AsyncPinecone
>>> async def main():
...     pc = AsyncPinecone(api_key="your-api-key")
...     index = pc.preview.index(name="articles-en-preview")
...     await pc.preview.close()
>>> asyncio.run(main())
Return type:

None

index(*, name=None, host=None)[source]

Get an AsyncPreviewIndex for data-plane ops.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Exactly one of name or host must be provided. When name is given, the host is resolved lazily on the first data-plane call via describe() and the result is cached on this AsyncPreview instance so subsequent data-plane calls with the same name avoid an extra control-plane round-trip.

This method is synchronous (no await required). Host resolution only happens when the returned AsyncPreviewIndex performs its first I/O operation.

Parameters:
  • name (str | None) – Index name. The host is resolved and cached lazily via await preview.indexes.describe(name) on first data-plane use.

  • host (str | None) – Data-plane host URL. Passed through directly without a control-plane call.

Returns:

AsyncPreviewIndex connected to the resolved host.

Raises:
  • PineconeValueError – If neither or both of name and host are provided.

  • NotFoundError – If name is given but the index does not exist (raised on first data-plane call).

  • ApiError – If the describe call returns an error response (raised on first data-plane call).

Return type:

AsyncPreviewIndex

Examples

>>> import asyncio
>>> from pinecone import AsyncPinecone
>>> async def main():
...     pc = AsyncPinecone(api_key="your-api-key")
...     index = pc.preview.index(name="articles-en-preview")
>>> asyncio.run(main())

Or pass a host directly to skip the control-plane call:

>>> async def main():
...     pc = AsyncPinecone(api_key="your-api-key")
...     index = pc.preview.index(host="https://articles-en-preview-xyz.pinecone.io")
>>> asyncio.run(main())
property indexes: AsyncPreviewIndexes

Access the async preview indexes control-plane namespace.

Lazily instantiated on first access. Reuses the parent client’s configuration and credentials.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Returns:

AsyncPreviewIndexes instance.

Examples

>>> import asyncio
>>> from pinecone import AsyncPinecone
>>> async def main():
...     pc = AsyncPinecone(api_key="your-api-key")
...     info = await pc.preview.indexes.describe("articles-en-preview")
...     print(info.host)
>>> asyncio.run(main())

AsyncPreviewIndexes

class pinecone.preview.async_indexes.AsyncPreviewIndexes(config)[source]

Bases: object

Async control-plane operations for preview indexes (2026-01.alpha).

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Access via pc.preview.indexes.

Parameters:

config (PineconeConfig) – SDK configuration used to construct an async HTTP client targeting the preview API version.

Examples

pc = AsyncPinecone(api_key="...")
index = await pc.preview.indexes.create(
    schema={"fields": {"embedding": {"type": "dense_vector", "dimension": 1536}}},
    name="my-preview-index",
)
__init__(config)[source]
Parameters:

config (PineconeConfig)

Return type:

None

async close()[source]

Close the underlying HTTP client. Idempotent.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Return type:

None

async configure(name, *, schema=None, deletion_protection=None, tags=None, read_capacity=None)[source]

Update configuration of an existing preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Only the fields you provide are updated; omitted parameters are left unchanged on the server.

Parameters:
  • name (str) – Name of the preview index to configure.

  • schema (dict[str, Any] | None) –

    Updated schema definition. Pass a dict with a "fields" key mapping field names to typed field definitions. The server only allows additive changes — it rejects requests that remove or modify existing fields. Example:

    await pc.preview.indexes.configure(
        "my-index",
        schema={"fields": {
            "summary": {"type": "string", "full_text_search": {}},
        }},
    )
    

  • deletion_protection (str | None) – "enabled" to prevent accidental deletion; "disabled" to allow it.

  • tags (dict[str, str] | None) – Replacement set of key-value tags for the index. Keys must be at most 80 characters; values at most 120 characters.

  • read_capacity (dict[str, Any] | None) – Updated read capacity configuration dict. Must include a "mode" key ("OnDemand" or "Dedicated").

Returns:

PreviewIndexModel reflecting the updated index state.

Raises:
  • PineconeValueError – If name is empty; if all kwargs are None; if schema, tags, or read_capacity is an empty dict; or if a tag key/value exceeds the length limit.

  • ApiError – If the API returns an error response.

Return type:

PreviewIndexModel

Examples

async def main():
    await pc.preview.indexes.configure(
        "my-index",
        schema={"fields": {"summary": {"type": "string"}}},
    )

Update read capacity to dedicated:

async def main():
    await pc.preview.indexes.configure(
        "my-index",
        read_capacity={"mode": "Dedicated", "node_type": "b1",
                       "scaling": "Manual",
                       "manual": {"shards": 2, "replicas": 1}},
    )

Update tags:

async def main():
    await pc.preview.indexes.configure(
        "my-index",
        tags={"env": "prod", "team": "search"},
    )

Enable deletion protection:

async def main():
    await pc.preview.indexes.configure("my-index", deletion_protection="enabled")
async create(*, schema, name=None, deployment=None, read_capacity=None, deletion_protection=None, tags=None)[source]

Create a new preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • schema (dict[str, Any]) –

    Index schema definition. A dict with a "fields" key mapping field names to their typed field definitions. Example:

    {
        "fields": {
            "embedding": {"type": "dense_vector", "dimension": 1536},
            "title": {"type": "string", "full_text_search": {}},
        }
    }
    

  • name (str | None) – Optional name for the index. If omitted, the API assigns one.

  • deployment (dict[str, Any] | None) – Optional deployment configuration dict. Must include a "deployment_type" key (e.g. "managed", "pod", "byoc"). When omitted the API uses its default deployment.

  • read_capacity (dict[str, Any] | None) – Optional read capacity configuration dict. Must include a "mode" key ("OnDemand" or "Dedicated"). When omitted the API uses on-demand mode.

  • deletion_protection (str | None) – Optional deletion-protection setting — "enabled" or "disabled". Defaults to "disabled" if not provided.

  • tags (dict[str, str] | None) – Optional key-value tags for the index. Keys must be at most 80 characters; values must be at most 120 characters.

Returns:

PreviewIndexModel describing the newly created index. The returned model’s status.ready may be False — use describe() to poll until the index is ready.

Raises:
  • PineconeValueError – If a tag key exceeds 80 characters or a tag value exceeds 120 characters.

  • ApiError – If the API returns an error response.

Return type:

PreviewIndexModel

Examples

index = await pc.preview.indexes.create(
    schema={"fields": {"embedding": {"type": "dense_vector", "dimension": 1536}}},
    name="my-preview-index",
)
async create_backup(index_name, *, name=None, description=None)[source]

Create a backup of a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • index_name (str) – Name of the index to back up.

  • name (str | None) – Optional user-defined name for the backup.

  • description (str | None) – Optional description providing context for the backup.

Returns:

PreviewBackupModel describing the newly created backup. The status field will typically be "Initializing" immediately after creation. Poll describe_backup() until status == "Ready" before using the backup:

backup = await pc.preview.indexes.create_backup("my-index", name="nightly")
# Poll until ready
import asyncio
while backup.status != "Ready":
    await asyncio.sleep(5)
    backup = await pc.preview.indexes.describe_backup(backup.backup_id)

Raises:
Return type:

PreviewBackupModel

Examples

await pc.preview.indexes.create_backup("my-index")

await pc.preview.indexes.create_backup(
    "my-index", name="nightly", description="Daily backup"
)
async delete(name, *, timeout=None)[source]

Delete a named preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Sends a DELETE request and, depending on timeout, polls until the index disappears.

Parameters:
  • name (str) – Name of the preview index to delete.

  • timeout (int | None) –

    Controls post-delete polling behaviour.

    • None (default): poll describe() every 5 seconds with no upper bound until the index is gone.

    • -1: return immediately after the DELETE response without polling.

    • Positive integer: poll until the index is gone or timeout seconds have elapsed. Raises PineconeTimeoutError if the deadline is reached before the index disappears.

Returns:

None

Raises:
Return type:

None

Examples

await pc.preview.indexes.delete("product-search-preview")

# Delete and wait up to 60 seconds
await pc.preview.indexes.delete("product-search-preview", timeout=60)

# Delete without polling
await pc.preview.indexes.delete("product-search-preview", timeout=-1)
async describe(name)[source]

Get detailed information about a named preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:

name (str) – Name of the preview index to describe.

Returns:

PreviewIndexModel with name, host, schema, deployment, read_capacity, status, deletion_protection, and tags.

Raises:
Return type:

PreviewIndexModel

Examples

desc = await pc.preview.indexes.describe("product-search-preview")
print(desc.host)
async exists(name)[source]

Check whether a named preview index exists.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Uses describe() internally; catches NotFoundError and returns False.

Parameters:

name (str) – Name of the preview index to check.

Returns:

True if the index exists, False if it does not.

Raises:
Return type:

bool

Examples

if await pc.preview.indexes.exists("product-search-preview"):
    print("Index found")
list(*, limit=None, pagination_token=None)[source]

List all preview indexes.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

The 2026-01.alpha server returns all indexes in a single page. The returned AsyncPaginator always yields exactly one page and then terminates, but the paginator interface is used for consistency and forward compatibility.

Parameters:
  • limit (int | None) – Maximum number of items to yield across all pages. Must be a positive integer. None yields all items.

  • pagination_token (str | None) – Token to resume pagination from a previous call. None starts from the beginning.

Returns:

AsyncPaginator over PreviewIndexModel instances.

Raises:
Return type:

AsyncPaginator[PreviewIndexModel]

Examples

async for index in pc.preview.indexes.list():
    print(index.name)

Collect all into a list:

all_indexes = await pc.preview.indexes.list().to_list()
list_backups(index_name, *, limit=None, pagination_token=None)[source]

List backups for a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Parameters:
  • index_name (str) – Name of the index whose backups to list.

  • limit (int | None) – Maximum number of backups to yield across all pages. Must be a positive integer. None yields all backups.

  • pagination_token (str | None) – Token to resume pagination from a previous call. None starts from the beginning.

Returns:

AsyncPaginator over PreviewBackupModel instances.

Raises:
Return type:

AsyncPaginator[PreviewBackupModel]

Examples

async for backup in pc.preview.indexes.list_backups("my-index"):
    print(backup.backup_id, backup.status)

Access page-level metadata:

paginator = pc.preview.indexes.list_backups("my-index")
async for page in paginator.pages():
    print(f"Got {len(page.items)} backups")
    for backup in page.items:
        print(backup.backup_id)

AsyncPreviewIndex

class pinecone.preview.async_index.AsyncPreviewIndex(config, host=None, _host_provider=None)[source]

Bases: object

Async data-plane wrapper for a preview index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Obtain via pc.preview.index(name=...) or pc.preview.index(host=...).

Parameters:
  • config (PineconeConfig) – SDK configuration shared with the parent client.

  • host (str | None) – Normalized data-plane host URL. Provide either host or _host_provider.

  • _host_provider (Callable[[], Awaitable[str]] | None) – Async callable that resolves the host on first data-plane use. Used internally when the factory is called with name=; callers should not pass this directly.

Examples

>>> import asyncio
>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> async def main() -> None:
...     async with pc.preview.index(name="articles-en-preview") as index:
...         response = await index.documents.upsert(
...             namespace="articles-en",
...             documents=[{"_id": "doc-1", "title": "Introduction to vectors"}],
...         )
>>> asyncio.run(main())

Explicit open/close when a context manager is not convenient:

>>> async def main() -> None:
...     index = pc.preview.index(host="https://my-index.svc.pinecone.io")
...     try:
...         response = await index.documents.upsert(
...             namespace="articles-en",
...             documents=[{"_id": "doc-1", "title": "Introduction to vectors"}],
...         )
...     finally:
...         await index.close()
>>> asyncio.run(main())
__init__(config, host=None, _host_provider=None)[source]
Parameters:
  • config (PineconeConfig)

  • host (str | None)

  • _host_provider (Callable[[], Awaitable[str]] | None)

Return type:

None

async close()[source]

Close the underlying HTTP client if initialized. Idempotent.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> import asyncio
>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> async def main() -> None:
...     index = pc.preview.index(host="https://my-index.svc.pinecone.io")
...     await index.close()
>>> asyncio.run(main())
Return type:

None

property documents: AsyncPreviewDocuments

Documents sub-namespace for data-plane operations on this index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Examples

>>> import asyncio
>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> async def main() -> None:
...     async with pc.preview.index(name="articles-en-preview") as index:
...         docs = index.documents
...         response = await docs.upsert(
...             namespace="articles-en",
...             documents=[{"_id": "doc-1", "title": "Introduction to vectors"}],
...         )
>>> asyncio.run(main())
property host: str

Data-plane host URL for this index.

Preview

Uses Pinecone API version 2026-01.alpha. Preview surface is not covered by SemVer — signatures and behavior may change in any minor SDK release. Pin your SDK version when relying on preview features.

Raises:

RuntimeError – If the host has not yet been resolved. When the index was created with name= rather than host=, the host is resolved lazily on the first data-plane call. Access host only after at least one data-plane operation has completed.

Examples

>>> from pinecone import Pinecone
>>> pc = Pinecone(api_key="your-api-key")
>>> index = pc.preview.index(host="https://my-index.svc.pinecone.io")
>>> print(index.host)
https://my-index.svc.pinecone.io