PHPackages                             probots-io/pinecone-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. probots-io/pinecone-php

ActiveLibrary[Database &amp; ORM](/categories/database)

probots-io/pinecone-php
=======================

Unofficial PHP Client for Pinecone Vector Database (pinecone.io)

1.1.0(1y ago)75414.1k↓14.2%25[3 issues](https://github.com/probots-io/pinecone-php/issues)[5 PRs](https://github.com/probots-io/pinecone-php/pulls)5MITPHPPHP ^8.3CI failing

Since Apr 14Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/probots-io/pinecone-php)[ Packagist](https://packagist.org/packages/probots-io/pinecone-php)[ Docs](https://probots.io)[ RSS](/packages/probots-io-pinecone-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (11)Used By (5)

Pinecone PHP
============

[](#pinecone-php)

A beautiful, extendable PHP Package to communicate with your [pinecone.io](https://pinecone.io) indices, collections and vectors, powered by [Saloon](https://github.com/saloonphp/saloon).

> **Info**From Version 1.x onwards we are using the latest Pinecone API which support serverless. If you need the legacy API please use a version before 1.0.0!

[![probots.io](art/probots-banner-1000x400.png)](https://probots.io)

Introduction
------------

[](#introduction)

This API provides a feature rich, elegant baseline for working with the [pinecone.io](https://pinecone.io) API. Developers can install and leverage this API to help them integrate [pinecone.io](https://pinecone.io) easily and beautifully.

Installation
------------

[](#installation)

`composer require probots-io/pinecone-php`

Features
--------

[](#features)

Currently supports all of the available endpoints in the [pinecone.io](https://pinecone.io) API based on [the official documentation](https://docs.pinecone.io/reference)

### Authentication

[](#authentication)

Authentication via Api Key is the only available authentication methods currently supported. First, you will need to create an Api Key in your [pinecone.io](https://pinecone.io) instance.

```
use \Probots\Pinecone\Client as Pinecone;

$apiKey = 'YOUR_PINECONE_API_KEY';

// Initialize Pinecone
$pinecone = new Pinecone($apiKey);

// Now you are ready to make requests, all requests will be authenticated automatically.
```

Quick Start
-----------

[](#quick-start)

There are two ways to initialize the SDK. You can either provide an index during initialization or you can provide it later on.

```
use \Probots\Pinecone\Client as Pinecone;

$apiKey = 'YOUR_PINECONE_API_KEY';
$pinecone = new Pinecone($apiKey);

// all control methods are available now, create an index or similar
// e.g. $pinecone->control()->index()

// later on you can provide the index
$pinecone->setIndexHost('INDEX_HOST_FROM_PINECONE');

// data methods are available now

// e.g. $pinecone->data()->vectors()
```

or

```
use \Probots\Pinecone\Client as Pinecone;

$apiKey = 'YOUR_PINECONE_API_KEY';
$indexHost = 'INDEX_HOST_FROM_PINECONE';

$pinecone = new Pinecone($apiKey, $indexHost);

// all control AND data methods are available now
```

> **Info**The index host should include `https://`, which you may need to prepend to the value returned from Pinecone.

> **Info**The index host should include `https://`, which you may need to prepend to the value returned from Pinecone.

Responses
---------

[](#responses)

All responses are returned as a `Response` object. Please check the [Saloon documentation](https://docs.saloon.dev/the-basics/responses#available-methods) to see all available methods.

Control Pane
============

[](#control-pane)

Index Operations
----------------

[](#index-operations)

Work(s) with your indices.

### Create Index (POD)

[](#create-index-pod)

[Pinecone Docs](https://docs.pinecone.io/reference/create_index)

```
$response = $pinecone->control()->index('my-index')->createPod(
    dimension: 1536,
    metric: 'cosine',
    podType: 'p1.x1',
    replicas: 1
    // ... more options
);

if($response->successful()) {
    //
}
```

### Create Index (Serverless)

[](#create-index-serverless)

[Pinecone Docs](https://docs.pinecone.io/reference/create_index)

```
$response = $pinecone->control()->index('my-index')->createServerless(
    dimension: 1536,
    metric: 'cosine',
    cloud: 'aws',
    region: 'us-west-2'
    // ... more options
);

if($response->successful()) {
    //
}
```

### Describe Index

[](#describe-index)

[Pinecone Docs](https://docs.pinecone.io/reference/describe_index)

```
$response = $pinecone->control()->index('my-index')->describe();

if($response->successful()) {
    //
}
```

### List Indices

[](#list-indices)

[Pinecone Docs](https://docs.pinecone.io/reference/list_indexes)

```
$response = $pinecone->control()->index()->list();

if($response->successful()) {
    //
}
```

### Configure Index

[](#configure-index)

[Pinecone Docs](https://docs.pinecone.io/reference/configure_index)

```
$response = $pinecone->control()->index('my-index')->configure(
    pod_type: 'p1.x1',
    replicas: 1
);

if($response->successful()) {
    //
}
```

### Delete Index

[](#delete-index)

[Pinecone Docs](https://docs.pinecone.io/reference/delete_index)

```
$response = $pinecone->control()->index('my-index')->delete();

if($response->successful()) {
    //
}
```

Collection Operations
---------------------

[](#collection-operations)

Work(s) with your collections too.

### Create Collection

[](#create-collection)

[Pinecone Docs](https://docs.pinecone.io/reference/create_collection)

```
$response = $pinecone->control()->collection('my-collection')->create(
    source: 'my-index'
);

if($response->successful()) {
    //
}
```

### Describe Collection

[](#describe-collection)

[Pinecone Docs](https://docs.pinecone.io/reference/describe_collection)

```
$response = $pinecone->control()->collection('my-collection')->describe();

if($response->successful()) {
    //
}
```

### List Collections

[](#list-collections)

[Pinecone Docs](https://docs.pinecone.io/reference/list_collections)

```
$response = $pinecone->control()->collection()->list();

if($response->successful()) {
    //
}
```

### Delete Collections

[](#delete-collections)

[Pinecone Docs](https://docs.pinecone.io/reference/delete_collection)

```
$response = $pinecone->control()->collection('my-collection')->delete();

if($response->successful()) {
    //
}
```

Data Pane
=========

[](#data-pane)

> **Info**These operations need the index to be set. You can set the index during initialization or later on. See description at the beginning.

Vector Operations
-----------------

[](#vector-operations)

Vectors are the basic unit of data in Pinecone. Use them.

### Get Index Stats

[](#get-index-stats)

[Pinecone Docs](https://docs.pinecone.io/reference/describe_index_stats)

```
$response = $pinecone->data()->vectors()->stats();

if($response->successful()) {
    //
}
```

### Update Vector

[](#update-vector)

[Pinecone Docs](https://docs.pinecone.io/reference/update)

```
$response = $pinecone->data()->vectors()->update(
    id: 'vector_1',
    values: array_fill(0, 128, 0.14),
    setMetadata: [
        'meta1' => 'value1',
    ]
);

if($response->successful()) {
    //
}
```

### Upsert Vectors

[](#upsert-vectors)

[Pinecone Docs](https://docs.pinecone.io/reference/upsert)

```
$response = $pinecone->data()->vectors()->upsert(vectors: [
    'id' => 'vector_1',
    'values' => array_fill(0, 128, 0.14),
    'metadata' => [
        'meta1' => 'value1',
    ]
]);

if($response->successful()) {
    //
}
```

### Query Vectors

[](#query-vectors)

[Pinecone Docs](https://docs.pinecone.io/reference/query)

```
$response = $pinecone->data()->vectors()->query(
    vector: array_fill(0, 128, 0.12),
    topK: 1,
);

if($response->successful()) {
    //
}
```

### Delete Vectors

[](#delete-vectors)

[Pinecone Docs](https://docs.pinecone.io/reference/delete_post)

```
$response = $pinecone->data()->vectors()->delete(
    deleteAll: true
);

if($response->successful()) {
    //
}
```

### Fetch Vectors

[](#fetch-vectors)

[Pinecone Docs](https://docs.pinecone.io/reference/fetch)

```
$response = $pinecone->data()->vectors()->fetch([
    'vector_1', 'vector_2'
]);

if($response->successful()) {
    //
}
```

Testing
-------

[](#testing)

Testing is done via PestPHP. You can run the tests by running `./vendor/bin/pest` in the root of the project. Copy .env.example to .env and update accordingly.

Credits
-------

[](#credits)

- [Marcus Pohorely](https://github.com/derpoho)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

TODO - Submit PR if you want to contribute:
-------------------------------------------

[](#todo---submit-pr-if-you-want-to-contribute)

- validate parameters based on API docs - needs more checking
- Implement Custom Exceptions
- Add failure tests
- Add some examples
- Finish docs

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance67

Regular maintenance activity

Popularity52

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~80 days

Total

8

Last Release

496d ago

Major Versions

0.1.0 → 1.0.02024-02-21

PHP version history (4 changes)0.0.1PHP &gt;=8.0

0.0.3PHP ^8.1

1.0.0PHP ^8.2

1.1.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7205f81ed8da235c1484cd8d79997ebda9413530958fac5167a0ed89ec9248e0?d=identicon)[derpoho](/maintainers/derpoho)

---

Top Contributors

[![derpoho](https://avatars.githubusercontent.com/u/253591?v=4)](https://github.com/derpoho "derpoho (41 commits)")[![scotteuser](https://avatars.githubusercontent.com/u/7620946?v=4)](https://github.com/scotteuser "scotteuser (4 commits)")[![ddebowczyk](https://avatars.githubusercontent.com/u/184133?v=4)](https://github.com/ddebowczyk "ddebowczyk (3 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (1 commits)")[![Sammyjo20](https://avatars.githubusercontent.com/u/29132017?v=4)](https://github.com/Sammyjo20 "Sammyjo20 (1 commits)")[![boralp](https://avatars.githubusercontent.com/u/907873?v=4)](https://github.com/boralp "boralp (1 commits)")[![zbora23](https://avatars.githubusercontent.com/u/9447532?v=4)](https://github.com/zbora23 "zbora23 (1 commits)")[![cwest144](https://avatars.githubusercontent.com/u/43122085?v=4)](https://github.com/cwest144 "cwest144 (1 commits)")[![ianfortier](https://avatars.githubusercontent.com/u/2520657?v=4)](https://github.com/ianfortier "ianfortier (1 commits)")

---

Tags

aiphppineconevectorclientsdkdatabasevectorpinecone

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/probots-io-pinecone-php/health.svg)

```
[![Health](https://phpackages.com/badges/probots-io-pinecone-php/health.svg)](https://phpackages.com/packages/probots-io-pinecone-php)
```

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[basho/riak

Official Riak client for PHP

159246.7k7](/packages/basho-riak)[helgesverre/milvus

PHP Client for the Milvus Rest API

306.2k](/packages/helgesverre-milvus)[morrislaptop/firestore-php

Firestore SDK for PHP without gRPC

6928.6k1](/packages/morrislaptop-firestore-php)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
