revGrok: Unofficial Grok API Wrapper
revGrok is an unofficial implementation that allows you to interact with Grok’s API in reverse.
Installation
To use this library, follow these simple steps:
-
Install the package:
pip install -U revgrok
-
Obtain your authentication cookie:
- Log in to the Grok web app and start any conversation.
- Record the cookie value from your browser.
-
Use the library: A simple example script, chat_example.py, demonstrates how to interact with Grok.
Example Usage
import asyncio
from src.revgrok import GrokClient
async def main():
cookie = "Your cookie here" # Replace with your actual cookie
model = "grok-3" # Choose your model (e.g., grok-3)
prompt = "9.8 and 9.11, which is bigger?" # Define your prompt
client = GrokClient(cookie=cookie)
async for response in client.chat(prompt=prompt, model=model, reasoning=False):
print(response, end="")
if __name__ == "__main__":
asyncio.run(main())
- Set
reasoning=Trueif you want to enable reasoning or leave it asFalseto disable it. - For free accounts, your usage may soon be limited. Consider upgrading to a paid plan to avoid interruptions.
Contribution
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request!
Metadata
Release files for revgrok 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| revgrok-0.1.5.tar.gz | 4.8 kB | Without provenance | Details for revgrok-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| revgrok-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for revgrok-0.1.5-py3-none-any.whl |
Total release size: 9.3 kB
Release files / revgrok-0.1.5.tar.gz
| Download URL | revgrok-0.1.5.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a657d875a42fa10056e5d2aa95a84c94ba241cb6340383770364100da812a351
|
|
BLAKE2b-256 checksum How to use checksums |
8c1f52f46fa27dd060ce51bd7486b4cb6fc034d561844cd97edb99e92af277ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / revgrok-0.1.5-py3-none-any.whl
| Download URL | revgrok-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
885f41e5931599fc8bef07a8b58a4ec8eca68fd535b11b4ebf59abd40cef53b4
|
|
BLAKE2b-256 checksum How to use checksums |
b6932ca4129f65a5caf89d13527ac6a67127b42eb866e0c297e3cbc71dfd6b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Security for revgrok 0.1.5
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.