---
name: holdapi
description: Set up a user's app or compatible client to spend $API AI credits through the holdapi.lol OpenAI-compatible gateway. Use when the user asks to connect their credits, configure the gateway, or make a first API request.
---

# Set up $API credits

Help the user connect available AI credits to the app or tool they choose. Read https://holdapi.lol/llms.txt and https://holdapi.lol/developers for the maintained product reference. Reward rules are at https://holdapi.lol/docs.

## 1. Establish what the user wants

Inspect the chosen app's existing client and configuration. Use its existing stack. It must support a custom OpenAI-compatible base URL and Chat Completions. Do not configure a Responses-only client. Claude or Codex can help set this up, but their own subscription or native account is not replaced by this gateway.

If the user has not started, direct them to https://holdapi.lol/dashboard. They connect their wallet, approve a sign-in message, opt in to AI credits, and create an API key. SOL is the default election. Holding alone does not create a spendable balance; eligible rewards must be allocated first. Existing credits remain usable after selling or switching future rewards to SOL.

The user handles token purchases and wallet approvals. Do not request wallet secrets or sign transactions on their behalf. Read the reward guide instead of promising returns or immediate credits.

## 2. Configure the chosen client

Set the base URL to https://holdapi.lol/v1, including /v1. The dashboard key begins with api_ and is shown once. Ask the user to put it directly into an ignored local environment file, their tool's private settings, or a server secret. Do not ask them to paste it into chat. Never print it, commit it, or expose it in browser bundles.

Use OPENAI_BASE_URL and OPENAI_API_KEY if the app supports them. Otherwise use the client's equivalent settings. Read only those required variables and report missing variable names without values. A missing key is a setup prerequisite, not a reason to fabricate a key.

## 3. Verify without spending

With the user's key loaded privately, GET https://holdapi.lol/v1/models and GET https://holdapi.lol/v1/balance using Authorization: Bearer <key>. These are read-only checks. Select a full chat provider/model ID from the live catalog. The default account catalog does not list image models; do not infer image IDs from chat models. Do not hardcode a display name or an invented model ID. Review current prices and the available balance.

Supported paths are GET /models, GET /balance, POST /chat/completions, POST /images/generations, POST /videos/generations and GET /videos/generations/{id} relative to the base URL. Responses, Assistants, embeddings, audio and files are not implemented.

Video is two steps: POST /videos/generations answers 202 with a job id and a poll_url, then GET /videos/generations/{id} with the same key answers 202 while it renders and 200 with the clip URL when it completes. Polling is free, credits are charged on the completing poll, and a failed job is not charged. Video models are priced per second; read the id, usd_per_second and max_duration_seconds from /models rather than guessing them.

## 4. Make a bounded first call when authorized

If the user has already authorized a paid test, use that scope. Otherwise ask before spending credits, naming the model and output limit. For chat, start with one non-streaming request, a short message, max_tokens: 256 and automatic retries disabled. If a model rejects that parameter, consult its supported configuration before retrying. For images, first verify an image model and size from a supported gateway source. If none is available, stop and explain that limitation. Use one image and disclose that it is a paid request.

A request must fit both available credit and the per-call spending ceiling. Do not raise limits or switch to a more expensive model to bypass a rejection. An interrupted request may still be charged; check balance before considering a retry.

## 5. Explain the result

Report the configured app, base URL, model ID, whether the read-only checks passed, and whether a paid request was actually tested. Keep keys redacted. If setup is blocked, give the next concrete step:

- 401: verify the full, unrevoked dashboard key.
- 402 insufficient credits: wait for earned credit or reduce the reservation.
- 402 quote_over_limit: reduce the requested output or image count; more balance does not lift the ceiling.
- 429: reduce request rate or concurrency.
- 502/503 or timeout: check balance and explain the uncertain charge before retrying.

## Optional installation

Reading this URL directly is enough for a one-time setup. If the user asks to install the skill, save this file as SKILL.md inside a holdapi folder in their existing agent skill directory. Follow that agent's current installation instructions and preserve its other skills. Do not modify agent configuration just because this document was linked.
