---
title: OpenAI-compatible apps
description: Any app, framework or library with a custom OpenAI endpoint can call Claude, GPT and Gemini through Half Off Dev at half the official price.
---

A huge number of apps and libraries let you replace the OpenAI endpoint with your own. Give them Half Off Dev's instead and they gain Claude and Gemini alongside GPT, because Half Off Dev serves OpenAI Chat Completions at `https://halfoff.dev/v1` for every text model, all at half the official price. Create an [API key](/app/keys) first.

## The three values {#settings}

Look for a "custom endpoint", "base URL" or "OpenAI-compatible" option and fill in:

| Field | Value |
| --- | --- |
| Base URL | `https://halfoff.dev/v1` |
| API key | your `ho-...` key |
| Model | any id from `GET /v1/models`, e.g. `claude-sonnet-5.5` or `gpt-6.1-sol` |

Some apps ask for an API *host* and add `/v1` themselves. For those, enter `https://halfoff.dev` only.

## Configure through the environment {#env-vars}

Programs built on the official OpenAI or Anthropic SDKs usually pick up the endpoint from environment variables, so you may not need to touch their settings at all:

```bash title="Shell"
# programs built on the OpenAI SDK
export OPENAI_BASE_URL=https://halfoff.dev/v1
export OPENAI_API_KEY=$HALFOFF_API_KEY

# programs built on the Anthropic SDK
export ANTHROPIC_BASE_URL=https://halfoff.dev
export ANTHROPIC_API_KEY=$HALFOFF_API_KEY
```

Writing the client yourself? [SDKs](/docs/integrations/sdks) has Python and Node.js samples, and [OpenAI Chat Completions](/docs/models/openai) details streaming, function calling and the supported fields.

## Fixing errors {#troubleshooting}

| What you see | What to do |
| --- | --- |
| `401` `Missing API key` | No key is reaching Half Off Dev. Check the variable name and that it is exported in the shell that starts the program. |
| `401` `Invalid or revoked API key` | The key was mistyped, cut short or revoked. Paste it again or make a new one. |
| `404` `Model '...' is not available` | That id doesn't exist. Copy one from `GET /v1/models` or the [model list](/models). |
| `404` `Unknown endpoint` | The program is calling an API Half Off Dev doesn't serve, embeddings for example. Point it at Chat Completions, Responses, Anthropic Messages or Gemini instead. |
| `404` `not served in responses format` | The Responses API serves GPT models only. Choose a `gpt-*` model, or use Chat Completions for Claude and Gemini. |
| `404` with `/v1/v1/` in the path | The program adds `/v1` itself. Use `https://halfoff.dev` as the host. |
| `402` | The balance is empty or the key has hit its spend cap. See [Billing](/docs/account/billing). |

Any other status is explained in [Errors](/docs/api/errors).
