# A PHP OpenAI API Client (SDK)

**URL:** <https://community.openai.com/t/a-php-openai-api-client-sdk/22481>\
**Category:** Community\
**Created:** [November 2, 2022, 7:20am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481 "2022-11-02T07:20:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.collins](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/james.collins/32/12478_2.png) [@james.collins](https://community.openai.com/u/james.collins)\
**Post date:** [November 2, 2022, 7:20am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/1 "2022-11-02T07:20:58Z")

</div>

Hi all,

We’ve put together a package that simplifies querying the OpenAI API from your PHP applications.

Full details here:

> **[An OpenAI API Client (SDK) for Your PHP Projects - Tectalic](https://tectalic.com/blog/openai-php-client-library-sdk)**
>
> Our new OpenAI REST API Client is now available, with GPT-3 and Codex model support. Includes Data Transfer Objects (DTOs) for all requests and responses and IDE autocomplete support.

Although the package is feature complete (it supports all publicly available endpoints), I would appreciate any feedback, comments or suggestions on how we could improve it.

It’s also listed in the OpenAI documentation’s [community libraries page](https://beta.openai.com/docs/libraries/community-libraries).

Please feel free to take a look, and let me know your thoughts.

Thanks,

James

---

<div class="post-metadata">

**Author:** ![james.collins](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/james.collins/32/12478_2.png) [@james.collins](https://community.openai.com/u/james.collins)\
**Post date:** [November 7, 2022, 5:53am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/2 "2022-11-07T05:53:30Z")

</div>

Hi everyone,

We have just released a new version of our PHP API Client that supports DALL·E image generation and editing.

> **[Release v1.2.0 · tectalichq/public-openai-client-php](https://github.com/tectalichq/public-openai-client-php/releases/tag/v1.2.0)**
>
> Added
> 
> Add support for DALL·E image generations, edits and variations.
> Add new ImageGenerations Handler, which creates an image given a prompt.
> Add new ImagesEdits Handler, which creates an edited ...

It supports [all 3 of the Images endpoints](https://beta.openai.com/docs/guides/images) (generations, edits and variations).

Please feel free to give it a try, and let me know any feedback.

Thanks,

James

---

<div class="post-metadata">

**Author:** ![james.collins](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/james.collins/32/12478_2.png) [@james.collins](https://community.openai.com/u/james.collins)\
**Post date:** [March 2, 2023, 3:57am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/3 "2023-03-02T03:57:50Z")

</div>

Hi all,

The Tectalic PHP API Client has been updated today, adding support for **ChatGPT** and **Whisper** endpoints:

> **[A ChatGPT API Client for Your PHP Applications - Tectalic](https://tectalic.com/blog/chatgpt-php-client-library-sdk)**
>
> The Tectalic OpenAI PHP Client Library now supports the new ChatGPT and Whisper APIs.

Enjoy!

James

---

<div class="post-metadata">

**Author:** ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)\
**Post date:** [March 2, 2023, 4:09am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/4 "2023-03-02T04:09:52Z")

</div>

Great job quickly updating. Thanks.

---

<div class="post-metadata">

**Author:** ![james.collins](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/james.collins/32/12478_2.png) [@james.collins](https://community.openai.com/u/james.collins)\
**Post date:** [March 2, 2023, 4:24am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/5 "2023-03-02T04:24:45Z")

</div>

Thanks @PaulBellow, much appreciated.

James

---

<div class="post-metadata">

**Author:** ![james.collins](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/james.collins/32/12478_2.png) [@james.collins](https://community.openai.com/u/james.collins)\
**Post date:** [March 17, 2023, 2:51am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/6 "2023-03-17T02:51:38Z")

</div>

Hi everyone,

To clarify, the latest version also supports both GPT-4 and GPT-3.5.

Please see our [examples documentation](https://tectalic.com/apis/openai/docs/php#examples) which has examples for many popular models including GPT-4, GPT-3.5, GPT-3 and more.

All the best,

James

---

<div class="post-metadata">

**Author:** ![ADi3ek](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@ADi3ek](https://community.openai.com/u/ADi3ek)\
**Post date:** [November 9, 2023, 4:47pm UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/7 "2023-11-09T16:47:07Z")

</div>

Hi @james.collins ,

I just saw that Tectalic OpenAI PHP client has been marked as abandoned? Is this project gone for good, or maybe there are some plans to keep it going (in any form) and current situation is just temporary?

I really like this client, and so far had no issues whatsoever. I think, it’s really solid piece of a software and it would be a bumer to trash it.

Cheers,  
ADi

---

<div class="post-metadata">

**Author:** ![magal](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@magal](https://community.openai.com/u/magal)\
**Post date:** [February 1, 2024, 5:03pm UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/8 "2024-02-01T17:03:08Z")

</div>

Hi @james.collins i keep getting “Unsuccessful response. HTTP status code: 429 (Too Many Requests).” even thought i just starting testing the sdk. Do you have an advice? thanks

---

<div class="post-metadata">

**Author:** ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)\
**Post date:** [February 1, 2024, 10:03pm UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/9 "2024-02-01T22:03:52Z")

</div>

> [@ADi3ek](#):
>
> ust saw that Tectalic OpenAI PHP client has been marked as abandoned?

Might want to look at the other PHP libraries…

[### PHP](https://platform.openai.com/docs/libraries/php)

- [orhanerday/open-ai](https://packagist.org/packages/orhanerday/open-ai) by [orhanerday](https://github.com/orhanerday)

- [openai-php client](https://github.com/openai-php/client) by [openai-php](https://github.com/openai-php)

---

<div class="post-metadata">

**Author:** ![rafasashi](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/rafasashi/32/548944_2.png) [@rafasashi](https://community.openai.com/u/rafasashi)\
**Post date:** [July 13, 2025, 8:29am UTC](https://community.openai.com/t/a-php-openai-api-client-sdk/22481/10 "2025-07-13T08:29:58Z")

</div>

I am using [orhanerday/open-ai](https://packagist.org/packages/orhanerday/open-ai) because many of my clients are still on php 7.

[openai-php client](https://github.com/openai-php/client) requieres php 8
