Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: VolkanSah/GPT-API-Integration-in-HTML-CSS-with-JS-PHP
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2024
Choose a base ref
...
head repository: VolkanSah/GPT-API-Integration-in-HTML-CSS-with-JS-PHP
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 7 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 2, 2024

  1. Update README.md

    VolkanSah authored Jun 2, 2024
    Copy the full SHA
    ecfc1f7 View commit details

Commits on Aug 30, 2024

  1. Update README.md

    VolkanSah authored Aug 30, 2024
    Copy the full SHA
    060c15f View commit details

Commits on Jan 24, 2025

  1. Update FUNDING.yml

    VolkanSah authored Jan 24, 2025
    Copy the full SHA
    ac41913 View commit details

Commits on Mar 24, 2025

  1. Update README.md

    VolkanSah authored Mar 24, 2025
    Copy the full SHA
    9e1554d View commit details

Commits on Jul 2, 2025

  1. Update README.md

    VolkanSah authored Jul 2, 2025
    Copy the full SHA
    7b200fa View commit details
  2. Merge pull request #24 from VolkanSah/VolkanSah-patch-1

    Update README.md
    VolkanSah authored Jul 2, 2025
    Copy the full SHA
    8c29020 View commit details
  3. Update README.md

    VolkanSah authored Jul 2, 2025
    Copy the full SHA
    4839807 View commit details
Showing with 21 additions and 16 deletions.
  1. +3 −1 .github/FUNDING.yml
  2. +18 −15 README.md
4 changes: 3 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: volkansah
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# GPT API Integration (in HTML/CSS with JS/PHP)
###### Updated: 02.06.2024 modules/endpoints
###### Updated: 02.07.2025 modules/endpoints

> [!IMPORTANT]
> Please note that this code example is for a basic web application to show "How to do it?", not production use!
![Screenshot](chatgpt.png)
[Need API-Stream? - show this branch](https://github.com/VolkanSah/GPT-API-Integration-in-HTML-CSS-with-JS-PHP/tree/gpt-with-stream)


![Screenshot](chatgpt.png)
> [!IMPORTANT]
> Please note that this code example is for a basic web application to show "How to do it?", not production use!
### Other Important sources for you! Please read befor!
- [Secure Implementation of Artificial Intelligence (AI)](https://github.com/VolkanSah/Implementing-AI-Systems-Whitepaper)
@@ -38,16 +39,18 @@ This README.md file will guide you through the process of integrating the GPT AP
## OpenAi-API Endpoints
**please change gptchat.php & config.php to your needs**

ENDPOINT | MODEL NAME
-- | --
/v1/chat/completions | gpt-4, gpt-4-0314, gpt-4-0613, gpt-4-32k, gpt-4-32k-0314, gpt-4-32k-0613, gpt-4-2024, gpt-4-32k-2024, gpt-3.5-turbo, gpt-3.5-turbo-0301, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-2024, gpt-3.5-turbo-16k-2024, gpt-3.5-turbo-0125
/v1/completions | ada, ada-code-search-code, ada-code-search-text, ada-search-document, ada-search-query, ada-similarity, babbage, babbage-code-search-code, babbage-code-search-text, babbage-search-document, babbage-search-query, babbage-similarity, code-davinci-edit-001, code-search-ada-code-001, code-search-ada-text-001, code-search-babbage-code-001, code-search-babbage-text-001, curie, curie-instruct-beta, curie-search-document, curie-search-query, curie-similarity, davinci, davinci-instruct-beta, davinci-search-document, davinci-search-query, davinci-similarity, text-ada-001, text-babbage-001, text-curie-001, text-davinci-001, text-davinci-002, text-davinci-003, text-davinci-edit-001, text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large, text-search-ada-doc-001, text-search-ada-query-001, text-search-babbage-doc-001, text-search-babbage-query-001, text-search-curie-doc-001, text-search-curie-query-001, text-search-davinci-doc-001, text-search-davinci-query-001, text-similarity-ada-001, text-similarity-babbage-001, text-similarity-curie-001, text-similarity-davinci-001
/v1/edits | text-davinci-edit-001, code-davinci-edit-001
/v1/audio/transcriptions | whisper-1
/v1/audio/translations | whisper-1
/v1/fine-tunes | davinci, curie, babbage, ada
/v1/embeddings | text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large, text-search-ada-doc-001, text-search-ada-query-001, text-search-babbage-doc-001, text-search-babbage-query-001, text-search-curie-doc-001, text-search-curie-query-001, text-search-davinci-doc-001, text-search-davinci-query-001
/v1/moderations | text-moderation-latest, text-moderation-stable, text-moderation-007

ENDPOINT | MODEL NAME
-- | --
/v1/chat/completions | gpt-4, gpt-4-0314, gpt-4-0613, gpt-4-32k, gpt-4-32k-0314, gpt-4-32k-0613, gpt-4-2024, gpt-4-32k-2024, gpt-4.1, gpt-3.5-turbo, gpt-3.5-turbo-0301, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-2024, gpt-3.5-turbo-16k-2024, gpt-3.5-turbo-0125, gpt-4.5, o3, o3-pro, o4-mini
/v1/completions | ada, ada-code-search-code, ada-code-search-text, ada-search-document, ada-search-query, ada-similarity, babbage, babbage-code-search-code, babbage-code-search-text, babbage-search-document, babbage-search-query, babbage-similarity, code-davinci-edit-001, code-search-ada-code-001, code-search-ada-text-001, code-search-babbage-code-001, code-search-babbage-text-001, curie, curie-instruct-beta, curie-search-document, curie-search-query, curie-similarity, davinci, davinci-instruct-beta, davinci-search-document, davinci-search-query, davinci-similarity, text-ada-001, text-babbage-001, text-curie-001, text-davinci-001, text-davinci-002, text-davinci-003, text-davinci-edit-001, text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large, text-search-ada-doc-001, text-search-ada-query-001, text-search-babbage-doc-001, text-search-babbage-query-001, text-search-curie-doc-001, text-search-curie-query-001, text-search-davinci-doc-001, text-search-davinci-query-001, text-similarity-ada-001, text-similarity-babbage-001, text-similarity-curie-001, text-similarity-davinci-001
/v1/edits | text-davinci-edit-001, code-davinci-edit-001
/v1/audio/transcriptions | whisper-1
/v1/audio/translations | whisper-1
/v1/fine-tunes | davinci, curie, babbage, ada
/v1/embeddings | text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large, text-search-ada-doc-001, text-search-ada-query-001, text-search-babbage-doc-001, text-search-babbage-query-001, text-search-curie-doc-001, text-search-curie-query-001, text-search-davinci-doc-001, text-search-davinci-query-001
/v1/moderations | text-moderation-latest, text-moderation-stable, text-moderation-007



You've successfully integrated the GPT API into your PHP website! Now, you can customize the chat interface and enhance the user experience as needed.
@@ -70,7 +73,7 @@ You've successfully integrated the GPT API into your PHP website! Now, you can c
### Other cool stuff for GPT!
- [OpenAI Text-to-Speech Interface](https://github.com/VolkanSah/OpenAI-Text-to-Speech-Interface)
- [ChatGPT ShellMaster (ChatGPT4 Plugin](https://github.com/VolkanSah/GPT-ShellMaster)
- ['GPT Comment reply' Plugin for WordPress](https://github.com/VolkanSah/GPT-Comments-Reply-WordPress-Plugin)
- ['GPT Comment reply' Plugin for WordPress](https://github.com/VolkanSah/aicc-comments-reply-plugin)
- [GPT over CLI](https://github.com/VolkanSah/GPT-over-CLI)
- [GPT-Security-Best-Practices](https://github.com/VolkanSah/GPT-Security-Best-Practices)
- [OpenAi cost calculator](https://github.com/VolkanSah/OpenAI-Cost-Calculator)