Skip to content

GithubRealFan/PHP-Based-ChatGPT-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Based-ChatGPT-API

A simple example of an API request and the output of messages to the browser

The code for this example was generated using ChatGPT

ChatGPT-Example

Usage

  1. In index.php, uncomment one of the options:
  • include "openai_api.php"; - uses the official API
  • include "openai_chat.php"; - use non-official API from chat.openai.com
  1. In openai_*.php, add the API key and/or cookie content _puid (available only for ChatGPT Plus users)

Releases

No releases published

Packages

No packages published

Languages