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.
| Setting | Value |
|---|---|
| OpenAI-compatible base URL | https://api.promptsforless.com/v1 |
| Anthropic-compatible base URL | https://api.promptsforless.com |
| API key | Your PromptsForLess key, stored as PFL_API_KEY |
| Model | A 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:
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
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:
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:
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.
| Result | What to check |
|---|---|
401 or 403 | Check the key, and check that your tool sends it in the Authorization or x-api-key header. |
| Insufficient balance | Top up in the dashboard. |
| Unknown model | Copy the exact ID from the model catalog or /v1/models. |
404 on an endpoint | Check the path. OpenAI-style clients use /v1; Anthropic clients use the origin URL. |
| Invalid request | Start from the small example above, then add parameters one at a time. |
429 | Follow 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.