| Option | Type | Default | Description |
|---|---|---|---|
cookies |
string | string[] |
auto | Path to cookies.json or array of cookie strings |
deviceId |
string |
random UUID | Stable device identifier |
timezoneOffset |
number |
-180 |
Minutes from UTC |
model |
string |
"auto" |
Model override |
historyDisabled |
boolean |
true |
Disable training on conversations |
Initialize session — solves PoW, runs Turnstile VM, gets Conduit token.
await client.init();Send a message and get the reply text.
const reply = await client.ask('What is 2+2?');Options:
| Option | Type | Description |
|---|---|---|
files |
string[] |
File paths to attach |
conversationId |
string |
Continue existing conversation |
parentMessageId |
string |
Branch from specific message |
model |
string |
Override model |
historyDisabled |
boolean |
Disable training |
Same as ask but returns an async iterable of chunks.
for await (const chunk of client.streamAsk('Tell me a story')) {
if (chunk.text) process.stdout.write(chunk.text);
}Search the web through ChatGPT.
const results = await client.searchWeb('weather today');Returns available models.
const models = await client.getModels();Returns available voices for TTS.
const voices = await client.getVoices();Generate speech audio. Returns a Buffer.
const audio = await client.generateSpeech('Hello', voiceId);Generate images with DALL-E. Returns an array of image objects.
const images = await client.generateImage('A cat in space');const profile = await client.getProfile();const history = await client.getConversations();const conv = await client.getConversation(convId);const billing = await client.getBillingInfo();const settings = await client.getSettings();const memory = await client.getMemory();const projects = await client.getProjects();List available GPTs.
const gizmos = await client.getGizmos();Get custom instructions.
const instructions = await client.getPersonalization();