Skip to main content
cURL lets you call the Boole AI API directly from the command line — no SDK, no runtime, just HTTP. It’s the fastest way to test an endpoint, inspect a raw response, or wire Boole into a shell script. All endpoints accept JSON and return JSON, or a stream of server-sent events when you enable streaming.

Set Your API Key

Export your API key once per shell session so you can reference it in every subsequent command.
Add that line to your shell profile (~/.zshrc, ~/.bashrc) so it’s available in every new terminal. For production scripts, pull the key from your secret manager instead of hardcoding it.

Chat Completion

Send a POST request to /v1/chat/completions with a JSON body containing your model name and message array.
Pipe the output to jq for readable, syntax-highlighted JSON: curl ... | jq . Add -s (silent) to suppress the progress bar when piping: curl -s ... | jq .

Streaming

Add "stream": true to the request body and --no-buffer to the cURL flags so tokens are written to your terminal as soon as Boole sends them.
Each line in the response is a server-sent event in the format data: {...}. The stream ends with data: [DONE].

List Models

Retrieve the full list of models available on your account with a GET request — no request body required.

Audio Transcription

Submit an audio file for transcription using multipart/form-data. Boole routes this to Whisper Large v3, priced at $0.02 per minute of audio.
Replace audio.mp3 with the path to any supported audio file. Whisper Large v3 accepts MP3, MP4, MPEG, MPGA, M4A, WAV, and WEBM formats.

Local Binary

When calling a locally running Boole binary, replace the base URL with http://localhost:8000. No Authorization header is required — the local server does not validate API keys.
Omit the Authorization header entirely for local deployments — including it won’t cause an error, but it isn’t needed. All other request and response fields are identical to the cloud API.