{"id":16673150,"url":"https://github.com/ph-7/openai-library","last_synced_at":"2025-05-13T18:32:38.666Z","repository":{"id":57038429,"uuid":"461142738","full_name":"pH-7/openai-library","owner":"pH-7","description":"👉  An easy SDK for using AI through OpenAI API with PHP 💪","archived":false,"fork":false,"pushed_at":"2023-07-09T05:09:00.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T06:35:41.801Z","etag":null,"topics":["ai","artificial-intelligence","openai","openai-library","php","php-openai"],"latest_commit_sha":null,"homepage":"https://github.com/pH-7/openai-library","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pH-7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-19T09:22:33.000Z","updated_at":"2024-10-05T10:37:04.000Z","dependencies_parsed_at":"2022-08-23T23:30:59.787Z","dependency_job_id":null,"html_url":"https://github.com/pH-7/openai-library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pH-7%2Fopenai-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pH-7%2Fopenai-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pH-7%2Fopenai-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pH-7%2Fopenai-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pH-7","download_url":"https://codeload.github.com/pH-7/openai-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254003420,"owners_count":21997886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","openai","openai-library","php","php-openai"],"created_at":"2024-10-12T12:24:49.856Z","updated_at":"2025-05-13T18:32:38.391Z","avatar_url":"https://github.com/pH-7.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP SDK for OpenAI and GPT-3\n\n\n### :eyes: Contents\n\n- [Requirements](#hammer-requirements)\n- [Examples](#thought_balloon-examples)\n- [3rd Party Libraries](#tada-3rd-party-libraries)\n- [About](#cook-author)\n- [Video](#me-building-this-library-)\n- [License](#page_with_curl-license)\n\n## :hammer: Requirements\n\n* [PHP 8.1 or newer](https://www.php.net/releases/8.1/en.php) 🎉\n* [Composer](https://getcomposer.org/doc/00-intro.md#introduction) installed on your machine 📦\n* An account on [OpenAI](https://openai.com/api/) for OpenAI's API keys.\n\n## :thought_balloon: Examples\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/vendor/autoload.php'; // Include Composer's autoload\n\nuse PH7\\OpenAi\\Api\\OpenAi as OpenAiApi;\nuse PH7\\OpenAi\\Api\\PrivateKey as OpenAiKey;\nuse PH7\\OpenAi\\Client as AiClient;\n\n$apiKey = new OpenAiKey('YOUR_OPENAI_KEY_HERE');\n$openAi = new AiClient( new OpenAiApi($apiKey) );\n$openAi-\u003esearch('Some keywords'); // To search\n$openAi-\u003eclassifications('Some keywords'); // For OpenAI classifications\n```\n\n## :tada: 3rd party libraries\n\n\n## :cook: Author\n\nI'm **[Pierre-Henry Soria](https://ph7.me)**. A passionate, zen \u0026amp; dedicated software engineer 😊\n\nYou can keep in touch with me at: *hi@ph7.me* 📮\n\n[![pH-7][github-image]](https://github.com/pH-7)\n\n---\n\n[![Pierre-Henry Soria](https://www.gravatar.com/avatar/a210fe61253c43c869d71eaed0e90149?s=200\u0026r=g\u0026d=mp)](https://ph7.me \"Pierre-Henry Soria\")\n\n\n## Me building it! 🔥\n\n[![Watch the video][video-thumbnail]](https://www.youtube.com/watch?v=Fv4J79eQjrc)\n\n👉 **[Click here to watch on YouTube](https://www.youtube.com/watch?v=Fv4J79eQjrc)**\n\n\n## :page_with_curl: License\n\n**PHP OpenAI SDK** is distributed under [MIT](https://opensource.org/licenses/MIT) license 🚀 Enjoy! ❤️\n\n*Note: This is not an official library published by OpenAI.* I just want to help the community by providing a great library layer to be used with OpenAI.\n\n\n\u003c!-- GitHub's Markdown reference links --\u003e\n[github-image]: https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white\n[video-thumbnail]: https://i1.ytimg.com/vi/Fv4J79eQjrc/sddefault.jpg\n\n\u003c!-- Was generated by README Generator CLI on 2022-02-20 https://github.com/pH-7/github-readme-generator-cli --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph-7%2Fopenai-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fph-7%2Fopenai-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph-7%2Fopenai-library/lists"}