AELDER

Connect through Helicone Gateway

Forward service text requests through Helicone's custom target gateway using an existing OpenAI SDK application.

AELDER · SERVICE BASE URL
https://aelder.dev/v1

LOCAL CONFIGURATION

Let my agent set this up

Copy this task to an agent already running on your computer. Enter your API key locally when asked.

SETUP PROMPT
Help me connect Helicone to AELDER using this guide: https://aelder.dev/docs/helicone/
Service Base URL: https://aelder.dev/v1
First inspect my installed version, active profile and configuration. Explain any mismatch with the guide before changing anything.
Use the documented local configuration or CLI method. Do not automate the GUI, install software or change permissions without asking.
Preserve existing accounts, providers, models, defaults, permissions and unrelated settings. Propose the smallest change, show a redacted diff, and back up any files before editing.
Have me enter my API key locally using the tool's secret storage or an environment variable. Never ask me to paste a key into chat, print it, or include it in a command, diff, log or commit.
Use the exact model ID I choose from my account's model list. Do not invent model IDs or assume every model supports every API format or tool feature.
Validate syntax and configuration loading before making any generation request. If there is no dry-run, say so.
Explain any proposed paid test, the model and what it sends, and ask for approval before running it. Do not send project files or private conversation history as a test.
Finish with the settings changed, checks performed and steps to restore the backup.

Use this optional route when you already use Helicone for request monitoring. You need a Helicone account with a write-enabled API key and an application using the OpenAI Python SDK. Helicone forwards requests to the service; it is an additional system that handles your service key, prompts and outputs and can record content. Review its logging and privacy settings first.

1. Set private connection values

Define these in your application’s private environment or ignored secret file:

Variable Value
SERVICE_BASE_URL The service Base URL above, including /v1
SERVICE_API_KEY Your service key
SERVICE_MODEL An exact text model ID from the authenticated models endpoint
HELICONE_API_KEY Your Helicone key with write permissions

Enter keys locally. Keep their values out of source code, shell history and setup chats.

2. Configure a separate client

The gateway preserves the request path. For a service Base URL ending in /v1, its target header contains the service origin, while the gateway Base URL contains /v1. This avoids sending /v1/v1/chat/completions.

import os
from urllib.parse import urlsplit, urlunsplit
from openai import OpenAI

service = urlsplit(os.environ["SERVICE_BASE_URL"])
if service.scheme != "https" or not service.netloc or service.query or service.fragment:
    raise ValueError("Use the service HTTPS Base URL without query or fragment")

client = OpenAI(
    api_key=os.environ["SERVICE_API_KEY"],
    base_url="https://gateway.helicone.ai" + service.path.rstrip("/"),
    default_headers={
        "Helicone-Auth": "Bearer " + os.environ["HELICONE_API_KEY"],
        "Helicone-Target-URL": urlunsplit((service.scheme, service.netloc, "", "", "")),
        "Helicone-Omit-Request": "true",
        "Helicone-Omit-Response": "true",
    },
    max_retries=0,
)

response = client.chat.completions.create(
    model=os.environ["SERVICE_MODEL"],
    messages=[{"role": "user", "content": "Reply with OK."}],
)
print(response.choices[0].message.content)

The omit headers request that Helicone exclude request and response bodies from its records. They do not hide the data from a gateway that must process it. Keep keys out of custom properties and debug logs. Preserve other clients and existing routing settings.

3. Verify deliberately

Saving this code does not test connectivity. Running it makes a paid service request and may incur separate Helicone charges. Inspect the result, Helicone request status and service dashboard. Helicone’s cost estimates do not replace service billing.

This recipe covers OpenAI-compatible Chat Completions. It does not establish support for other API formats or configure automatic fallback models. For 404, check that the forwarded path ends in /v1/chat/completions once.

See the official gateway integration, header directory and privacy information.

Need the key? Open your AELDER dashboard. For direct API calls, see the API reference.