Quickstart

Create a PromptsForLess API key, add balance and send your first Chat Completions or Anthropic Messages request in a few minutes.

You need three things: an API key, some balance and a model ID.

SettingValue
OpenAI-compatible base URLhttps://api.promptsforless.com/v1
Anthropic-compatible base URLhttps://api.promptsforless.com
API keyYour PromptsForLess key, stored as PFL_API_KEY
ModelA public ID from the model catalog, such as deepseek-v4.1-flash

Create an API key

Sign in to the dashboard and create an API key. Store it as PFL_API_KEY in a secret manager or a local environment file that stays out of version control:

Terminal
export PFL_API_KEY="your-promptsforless-key"

Add balance

Top up your prepaid balance in the dashboard. We match your first $5, so adding $5 gives you $10 to spend. There is no subscription or minimum.

Send a request

Terminal
curl --fail-with-body https://api.promptsforless.com/v1/chat/completions \
  -H "Authorization: Bearer $PFL_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [{"role": "user", "content": "Reply with one sentence about the moon."}]
  }'

The reply text is in choices[0].message.content. The usage object shows how many input and output tokens the request used.

List models

Fetch every model your key can use:

Terminal
curl --fail-with-body https://api.promptsforless.com/v1/models \
  -H "Authorization: Bearer $PFL_API_KEY"

Use the IDs in the response's data array exactly as written.

Use the Anthropic Messages API

Claude Code and the Anthropic SDKs use the Anthropic-compatible API. Point them at the origin URL, without /v1:

Terminal
curl --fail-with-body https://api.promptsforless.com/v1/messages \
  -H "x-api-key: $PFL_API_KEY" \
  -H 'anthropic-version: 2023-06-01' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Reply with hello."}]
  }'

For Claude Code, follow the Claude Code guide.

Fix a failed request

Failed requests are not billed, so it is safe to retry while you debug.

ResultWhat to check
401 or 403Check the key, and check that your tool sends it in the Authorization or x-api-key header.
Insufficient balanceTop up in the dashboard.
Unknown modelCopy the exact ID from the model catalog or /v1/models.
404 on an endpointCheck the path. OpenAI-style clients use /v1; Anthropic clients use the origin URL.
Invalid requestStart from the small example above, then add parameters one at a time.
429Follow the retry guidance in the response and send fewer parallel requests.

Connect your stack

Use the OpenAI SDK guide for Python or TypeScript, or pick a tool from the integration directory.

On this page