Skip to main content

UnlimitedChatGPTWebAPI

Resolve Cloudflare Challenge To use ChatGPT Web API

Installation

pip3 install UnlimitedChatGPTWebAPI

then you should run playwright install chromium

For windows, maybe you should use it -> playwright install-deps chromium

Configuration

  1. Make sure your network or agent can access https://chat.openai.com
  2. Please make sure that the VPS RAM is not too small.

Usage

Basic example

import asyncio

from UnlimitedChatGPTWebAPI import ChatSession


async def main():
    async with ChatSession(proxies="socks5://localhost:7890") as session:
        # or use this if you want to use the same session for multiple requests
        # example:
        # session = ChatSession(proxies="socks5://localhost:7890")
        # await session.init_page()
        async with session.fetch(
            method="GET",
            url="/backend-api/models",
            headers={"Authorization": "Bearer xxx"}
        ) as resp:
            print(await resp.json())

if __name__ == "__main__":
    asyncio.run(main())

Streaming example

import asyncio

from UnlimitedChatGPTWebAPI import ChatSession


async def main():
    async with ChatSession(proxies="socks5://localhost:7890") as session:
        # or use this if you want to use the same session for multiple requests
        # example:
        # session = ChatSession(proxies="socks5://localhost:7890")
        # await session.init_page()
        async with session.fetch(
            method="GET",
            url="/backend-api/models",
            headers={"Authorization": "Bearer xxx"}
        ) as resp:
            data = b""
            async for chunk in resp.iter_chunked():
                data += chunk
            print(data.decode())

if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for UnlimitedChatGPTWebAPI 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for UnlimitedChatGPTWebAPI 0.1.2
File Size Uploaded Provenance Actions
UnlimitedChatGPTWebAPI-0.1.2.tar.gz 8.6 kB Without provenance Details for UnlimitedChatGPTWebAPI-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for UnlimitedChatGPTWebAPI 0.1.2
File Interpreter ABI Platform Actions
UnlimitedChatGPTWebAPI-0.1.2-py3-none-any.whl Python 3 none any Details for UnlimitedChatGPTWebAPI-0.1.2-py3-none-any.whl

Total release size: 17.8 kB

Release files / UnlimitedChatGPTWebAPI-0.1.2.tar.gz

Download URL UnlimitedChatGPTWebAPI-0.1.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d0b54f7790d84cb09b1afdae8e9b4008549fd47f7ffb33ce1fc806867a4aee88
BLAKE2b-256 checksum
How to use checksums
ab42540e171fc5360828a3d20d641cd12d9f2e5ba356bdef34ba7c95abf6a755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / UnlimitedChatGPTWebAPI-0.1.2-py3-none-any.whl

Download URL UnlimitedChatGPTWebAPI-0.1.2-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69ba74830e17d95086c87e179ac30f5022af1feada5d2389c2b3d05ee525b1e6
BLAKE2b-256 checksum
How to use checksums
043337459433878b6c96b6ec24eed77bc2f0ae9d99ebcbf8e658b5328d2d4af7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for UnlimitedChatGPTWebAPI 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page