Fork: 354 Star: 3835 (更新于 2023-03-20 05:07:33)

license: Unlicense , Language: Python.

Reverse engineered API of Microsoft's Bing Chat

最后发布版本: 0.0.60 (2023-03-17 18:56:02)



Edge GPT

The reverse engineering the chat feature of the new version of Bing

PyPI version Python version

Table of Contents


Install package

python3 -m pip install EdgeGPT --upgrade


Checking access (Required)

  • Install the latest version of Microsoft Edge
  • Open
  • If you see a chat feature, you are good to go

Getting authentication (Required)

  • Install the cookie editor extension for Chrome or Firefox
  • Go to
  • Open the extension
  • Click "Export" on the bottom right (This saves your cookies to clipboard)
  • Paste your cookies into a file cookies.json


Quick start

 $ python3 -m EdgeGPT -h

        EdgeGPT - A demo of reverse engineering the Bing GPT chatbot
        By: Antonio Cheong

        !help for help

        Type !exit to exit
        Enter twice to send message or set --enter-once to send one line message

usage: [-h] [--enter-once] [--no-stream] [--style {creative,balanced,precise}] --cookie-file COOKIE_FILE

  -h, --help            show this help message and exit
  --style {creative,balanced,precise}
  --cookie-file COOKIE_FILE

Developer demo

Three ways to pass in cookies:

  • Environment variable: export COOKIE_FILE=/path/to/cookies.json.

  • Specify the path to cookies.json in the argument cookiePath like this:

    bot = Chatbot(cookiePath='./cookie.json')
  • Pass in the cookies directly by the argument cookies, like this:

    with open('./cookie.json', 'r') as f:
        cookies = json.load(f)
    bot = Chatbot(cookies=cookies)

Use Async for the best experience

Reference code for more advanced example of usage:

import asyncio
from EdgeGPT import Chatbot, ConversationStyle

async def main():
    bot = Chatbot()
    print(await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative))
    await bot.close()

if __name__ == "__main__":

Work in progress

  • Error handling

Star History

Star History Chart


This project exists thanks to all the people who contribute.

最近版本更新:(数据更新于2023-03-19 10:57:18)

2023-03-17 18:56:02 0.0.60

2023-03-17 18:22:52 0.0.59

2023-03-17 13:43:50

2023-03-16 15:02:07

2023-03-16 07:48:17 0.0.57

2023-03-15 08:46:19

2023-03-13 18:29:41

2023-03-13 17:55:47 0.0.56

2023-03-05 10:55:55 0.0.55

2023-03-04 20:58:31 0.0.54


binggpt, chatgpt, edge, edgegpt, gpt, reverse-engineering


2023-03-20 20:09:07 34j/so-vits-svc-fork

2023-03-20 17:49:50 NAStool/nas-tools

2023-03-19 01:04:31 sqlalchemy/sqlalchemy

2023-03-17 10:29:20 notepad-plus-plus/nppPluginList

2023-03-17 09:56:24 modelscope/modelscope

2023-03-17 03:58:33 home-assistant/core