Skip to content
PALEPALE / DOCUMENTATION

Start with Palepale

Activate access, choose a model, and send your first streaming request.

Getting started

Use these steps to connect a local app after the Palepale team activates your access.

1. Activate your access

Choose API tokens or a plan, then contact Palepale on Discord. Confirm the allowance and models before payment. The team supplies your gateway address and a separate credential for each device.

2. Set your connection details

Use these names in the examples below. Replace the example address with your supplied gateway; it is not this website's address. The SDK base URL ends with /v1.

bash
export PALEPALE_BASE_URL="https://YOUR_GATEWAY/v1"export PALEPALE_API_KEY="YOUR_DEVICE_CREDENTIAL"

In Windows PowerShell:

powershell
$env:PALEPALE_BASE_URL = "https://YOUR_GATEWAY/v1"$env:PALEPALE_API_KEY = "YOUR_DEVICE_CREDENTIAL"

Keep these values local. Your device credential is a secret, not your account name.

3. Choose an available model

Read your gateway's catalog before sending a request:

bash
curl "$PALEPALE_BASE_URL/models"

PowerShell can use Invoke-RestMethod "$env:PALEPALE_BASE_URL/models". Copy an id from the returned data array into PALEPALE_MODEL. Check the model's capabilities and limits in Models.

bash
export PALEPALE_MODEL="REPLACE_WITH_APPROVED_MODEL_ID"

On Windows, use $env:PALEPALE_MODEL = "REPLACE_WITH_APPROVED_MODEL_ID".

4. Send a short request

Use the curl, Python or TypeScript example below. The curl example uses Bash; on Windows, use Git Bash, WSL, or the Python example. For Python, install openai in your project environment. For TypeScript, install the openai package in your project.

A successful stream contains text, a finish reason and usage, followed by [DONE]. An HTTP success alone is not enough: read error events until the stream ends. API details and errors.

5. Connect your coding tool

Use the OpenCode setup for a custom provider, or the Palepale CLI guide for the native client. The CLI uses a gateway origin without /v1; SDK clients use the base URL with /v1.

Check account usage

bash
curl "$PALEPALE_BASE_URL/account" -H "Authorization: Bearer $PALEPALE_API_KEY"

Your devices share a token budget. This endpoint reports account usage and reservations; it is not a cash-wallet balance. See plans and activation or troubleshooting.

Need a hand?

Open Palepale Discord for activation or account support. Compare API offers or choose a plan.

REQUEST EXAMPLES

Make your first request.
Use your own access details.

Set the address, key, and model from your activation details. These examples stream one short request.

Get API access
first-request.sh
# Set these to the details supplied at activation.# PALEPALE_BASE_URL ends with /v1; PALEPALE_MODEL is a live catalog ID.curl -N "$PALEPALE_BASE_URL/chat/completions" \  -H "Authorization: Bearer $PALEPALE_API_KEY" \  -H "Content-Type: application/json" \  -d "{\"model\":\"$PALEPALE_MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":true,\"stream_options\":{\"include_usage\":true}}"