Point any OpenAI-compatible client at https://logfare.ai/v1 and use your Logfare API key. Anthropic Messages and the OpenAI Responses API also work. Model IDs change often, so check /models for what's available right now.
Authentication
Model requests need an API key. Register for a free account: your first key is shown when you sign up. Create more keys in your dashboard (up to 10, one per app or machine is a good habit) and revoke or roll each one on its own. Keys share your account's model access, limits and privacy choices. Logfare keeps only a fingerprint of each key, so a key is shown once, when it's created or rolled. Your Discord account must stay in the Logfare server to keep access.
Send the key as a Bearer token. The x-api-key header also works, which is what Anthropic clients send.
Authorization: Bearer YOUR_API_KEY
Building an app for other people? Use App integrations so each user approves your app without sharing their key.
Endpoints
All endpoints are under https://logfare.ai/v1.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat completions (streaming supported) |
| POST | /v1/responses | OpenAI Responses API |
| POST | /v1/messages | Anthropic Messages API |
| POST | /v1/completions | Legacy text completions |
| POST | /v1/images/generations | Image generation |
| POST | /v1/images/edits | Image editing |
| POST | /v1/audio/speech | Text to speech |
| POST | /v1/audio/transcriptions | Speech to text |
| POST | /v1/embeddings | Text embeddings |
| POST | /v1/videos/generations | Video generation |
| POST | /v1/decisions | Decision models |
| GET | /v1/models | Available models (no key needed) |
| GET | /v1/status | Service and model health (no key needed) |
Models & access
GET /v1/models
Lists the models available on Logfare, in the OpenAI format. No key is needed; with a key, the list also includes private models your key can reach. Chat-only models are listed for discovery but cannot be used with an API key. Each entry adds these Logfare fields:
| Field | Description |
|---|---|
endpoints | APIs the model serves, such as chat/completions or images/generations |
aliases | Other names that route to the same model |
tier, access_tier | Access tier: 1/standard, 2/premium or 3/pro (see below). Private models report tier: 0; their access_tier still names the gate. |
requires_training_optin | true for premium and pro models |
requires_data_sale_optin | true for pro models |
chat_only | true when the model is available only in Logfare Chat. It is listed for discovery, but every API key, OAuth app and SSO request returns 403 with code chat_only_model. |
premium_unlocked | Whether the key you sent can use the model right now (any tier) |
rate_limit_exempt | Whether the model bypasses account and network request allowances. Account and service concurrency limits still apply. |
chat_capabilities | Input types (input_modalities), reasoning controls, and tools support for chat models |
context_length, max_output_tokens | Input and output limits Logfare enforces for the model, when set. Larger inputs are rejected with 413; larger max_tokens values are lowered. |
upstream_metadata | Published specs such as context length, input types and supported parameters, when available. For text models, top_provider.max_completion_tokens is the output ceiling the model's primary upstream provider advertises; it varies by provider and shares the context window with your input. These are a general reference, so check the limits above first. |
There are three tiers, and every one is free:
| Tier | Unlocked by | Rate-limit perk |
|---|---|---|
| Standard | An account | — |
| Premium | Opting in to model training at /consent | Premium account budget (see Request limits) |
| Pro | Opting in to model training and data sale at /consent | Pro account budget (see Request limits) |
The models page labels Standard models Free. Its search matches model names, aliases, tier labels such as Free or Pro, API endpoints, owners, and published model details. Models that bypass request allowances carry a Request-limit exempt label.
Until you reach a model's tier, requests return 403 with code training_optin_required (premium) or data_sale_optin_required (pro). Account tier budgets and concurrency are configurable independently. Your allowance is shared across all unlocked models, API formats and connected apps; it is not a separate allowance per model.
Discord boost bonuses use the percentage configured by staff. The current request percentage and extra concurrent requests per boost are listed under Request limits. Concurrency bonuses add a fixed whole number per boost, independently of the request percentage; 0 adds none. Any custom request or concurrency override disables all boost bonuses for that account, and new accounts do not receive boost bonuses. Discord exposes boosting status, not the exact count; ask staff to verify additional boosts. See Dashboard → Overview for your effective numbers.
Training consent, data-sale consent, optional history inclusion and evaluation preferences can be managed at Dashboard → Privacy & Data or /consent. Data-sale opt-in is only available after the displayed opening date and requires training consent. Withdrawing training consent also withdraws data-sale consent. Global Privacy Control is honoured; opting in despite that signal requires confirmation.
curl https://logfare.ai/v1/models
Chat Completions
POST /v1/chat/completions
Standard OpenAI chat completions. Set "stream": true to stream over SSE.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID from /models, or logfare/auto |
messages | array | Yes | Array of {role, content} messages |
stream | boolean | No | Stream the response over SSE |
max_tokens | integer | No | Maximum tokens to generate |
temperature, top_p, stop | No | Standard sampling options |
Other OpenAI parameters, such as tools, response_format, reasoning_effort, and image content parts, are passed to the model's provider. Check the model's chat_capabilities to see what it supports.
curl https://logfare.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "logfare/auto",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://logfare.ai/v1",
api_key="YOUR_API_KEY",
)
stream = client.chat.completions.create(
model="logfare/auto",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")Auto Routing
Use logfare/auto as the model and Logfare picks the best available chat model for you. If a model fails, the next one in the chain is tried, so you still get a response. auto and logfare/random are aliases.
Routing only uses models your key can access. Private models and Logfare Chat-only models are never in the Auto chain. Auto works with Chat Completions, Messages, and Responses.
Messages & Responses
POST /v1/messages POST /v1/responses POST /v1/completions
Use the Anthropic Messages format, the OpenAI Responses format, or legacy completions with the same models and key. Point an Anthropic SDK's base URL at https://logfare.ai (without /v1).
curl https://logfare.ai/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "logfare/auto",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Images
POST /v1/images/generations
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Image model ID |
prompt | string | Yes | Description of the image |
size | string | No | Dimensions as WxH, such as 1024x768 |
n, steps, response_format | No | Supported by some models |
POST /v1/images/edits takes the same fields as multipart/form-data, plus the source image. Only models listing images/edits support it.
curl https://logfare.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "flux-2-dev",
"prompt": "a cat sitting on a windowsill, warm afternoon light",
"size": "1024x1024"
}'Text to Speech
POST /v1/audio/speech
Send model and the input text as JSON; voice is optional and depends on the model. Returns audio.
Transcriptions
POST /v1/audio/transcriptions
Send model and the audio file as multipart/form-data. Returns the transcribed text.
Embeddings
POST /v1/embeddings
Send model and input, a string or an array of strings. Returns one vector per input.
Video
POST /v1/videos/generations
Send model and prompt as JSON. The request stays open until the video is ready, which can take several minutes, so set a long client timeout. Other fields depend on the model.
Decision Models
POST /v1/decisions
A decision model reads a state and a set of typed questions, and returns a probability for every allowed answer instead of generating text. Use it to classify, route, or score. Models: clef (27B, most precise), clef-flash (9B, faster), and 8ball, a joke model that answers by hashing the state (deterministic and not logged). Questions about self-harm always get a supportive no, marked "support": true.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | clef, clef-flash, or 8ball |
state | string | object | Yes | What to decide on: text, JSON, or an image or video reference |
questions | object | No | Map of question name to {type, instructions, criteria}. Omit it for a single yes/no answer about the whole state. |
Question types: noul returns a yes/no probability. choice takes a map of options to descriptions and returns the chosen option with per-option probabilities. score takes an ordered list of levels and returns a weighted score with per-level probabilities.
curl https://logfare.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "clef",
"state": "Checkout has been failing for every customer for the last hour.",
"questions": {
"urgent": { "type": "noul", "instructions": "Is this support request urgent?" },
"team": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"billing": "Payments, invoices, and refunds",
"technical": "Outages, errors, and configuration",
"sales": "Plans and upgrades"
}
},
"severity": {
"type": "score",
"instructions": "How severe is the customer impact?",
"criteria": ["No impact", "Minor", "Major", "Critical"]
}
}
}'Response (answers is keyed by question name):
{
"result": {
"model": "clef",
"answers": {
"urgent": { "type": "noul", "noul": 0.9895 },
"team": {
"type": "choice",
"choice": "technical",
"probabilities": { "billing": 0.1584, "technical": 0.8274, "sales": 0.0142 },
"confidence": 0.5648
},
"severity": {
"type": "score",
"score": 2.9484,
"legend": { "0": "No impact", "1": "Minor", "2": "Major", "3": "Critical" },
"probabilities": { "0": 0.0043, "1": 0.0047, "2": 0.0292, "3": 0.9618 },
"confidence": 0.9012
}
}
},
"success": true,
"errors": [],
"messages": []
}Request limits
These are the current limits and update automatically when they change.
| Scope | Request budget | Concurrent requests |
|---|---|---|
| Regular account | 40 requests per minute 1,000 requests per hour 5,000 requests per day | 6 |
| Premium account | 80 requests per minute 2,000 requests per hour 10,000 requests per day | 12 |
| Pro account | 160 requests per minute 4,000 requests per hour 20,000 requests per day | 24 |
| New account | 10 requests per minute 200 requests per hour 500 requests per day | 2 |
| Shared network / IP | 320 requests per minute 8,000 requests per hour 40,000 requests per day | Account and service limits apply |
Each account tier has one shared allowance across its unlocked models. Discord boosts add +50% per boost to the request allowance (up to 4 counted boosts). Each boost also adds 12 concurrent requests, independently of the request percentage. Any custom request or concurrency override disables all boost bonuses for that account. New accounts do not receive boost bonuses. See your effective limits in Dashboard → Overview.
New accounts use the new-account budget for their first 24 hours.
Up to 800 requests can be in progress across all accounts. Individual models and providers can have their own shared limits, so capacity isn't guaranteed.
During the new-account period, opting in can unlock Premium or Pro models, but the temporary new-account request and concurrency limits still apply. The tier's account limits take effect once probation ends, unless an admin has set custom limits. Your training and data-sale choices apply immediately to requests made during probation, including eligibility for training or sale when you opt in. Routine request logging continues when you opt out of these uses.
The dashboard labels the active limit schedule NEW, STANDARD, PREMIUM, PRO, or CUSTOM. A model marked Request-limit exempt bypasses account and network request allowances, while concurrency limits and provider caps still apply.
The shared network allowance is counted across every account that reaches Logfare from the same address, and it applies in addition to your account's own limits. The lower one stops a request. This is checked per window. In any window (minute, hour or day) where your account's own limit is higher than the network's, or unlimited, your account's limit applies instead, and your requests don't use up the network's count for that window. Every other window, and every other account on the address, is counted as usual.
Dashboard → Overview shows how much of each limit you've used in the current window and when it resets. Each admitted inference request also returns x-ratelimit-limit-requests, x-ratelimit-remaining-requests and x-ratelimit-reset-requests (for example 35s) for the account window closest to running out; models exempt from request limits don't send them. Limits apply across all endpoints and use fixed UTC windows; provider daily budgets reset at 00:00 UTC. Regenerating your key doesn't reset them. When your account or network reaches a request allowance, the 429 error names each blocking window and its effective request limit. The error.limits array gives requests and window_seconds; error.retry_after matches the Retry-After header. Wait that long before retrying. Upstream provider errors may include different details.
Fair use: one account, back off when refused
- One account per person. Extra accounts (including ones linked to other Discord accounts) and using someone else's account aren't allowed, and neither is rotating accounts, keys, Discord accounts, IP addresses or networks to get past limits or a suspension. Accounts we believe belong to the same person may all be suspended. Apps where other people connect their *own* accounts are fine. See the Terms.
- Automation is welcome within your limits. Scripts, bots, agents and apps can use Logfare as much as your limits allow.
- You can just queue. A request sent while your account is at its concurrency limit waits for a free slot (up to 30 seconds by default) and starts as soon as one frees up, so there's no need to cap each agent yourself. Only if no slot frees up in time do you get a
429. - Back off when refused. After a
429or503, wait at least theRetry-Aftertime before retrying, and don't retry in a tight loop. A key that keeps retrying straight through refusals is paused automatically: every request gets an immediate429with aRetry-Afteruntil the pause ends (30 seconds by default). Clients that respectRetry-Afterare never paused. Need more? Ask staff instead of working around the limits.
Errors
Errors use the OpenAI format. /v1/messages and /v1/responses use the Anthropic and Responses formats instead.
{
"error": {
"message": "Your account has reached its request budget. Limit reached: 40 requests per minute. Retry in 23 seconds.",
"type": "rate_limit_error",
"limits": [{"requests": 40, "window_seconds": 60}],
"retry_after": 23
}
}| Status | Meaning |
|---|---|
| 400 | Invalid request. Code content_policy_violation means content moderation blocked it. |
| 401 | Missing or invalid API key |
| 403 | No access: Discord membership or screening needed, a private model, a Logfare Chat-only model (code chat_only_model), a premium model that needs training opt-in (code training_optin_required), or a pro model that needs data-sale opt-in (code data_sale_optin_required) |
| 404 | Unknown model, or the model doesn't support this endpoint |
| 413 | Request body too large, or input over the model's context limit (code context_length_exceeded) |
| 429 | Request limit reached. Respect Retry-After. |
| 5xx | The provider failed or the service is busy. Retry with backoff or try another model. |
Errors returned by a model's provider are passed through with the provider's status code and message.
Account API
These endpoints power the Logfare website and use its login session, not your API key. Create an account on the registration page. Existing accounts without Discord can link it at /migrate. Each Discord account links to one Logfare account, and leaving the server suspends access until you rejoin.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/auth/me | Current account, consent flags and effective limits (tier, request windows, concurrency, boost adjustments, and usage: requests used in each current window, seconds until it resets, and requests running now) |
| GET | /v1/auth/api-keys | Your API keys: name, prefix, created and last-used times. Never the keys themselves. |
| POST | /v1/auth/api-keys | Create a key ({"name": "Laptop"}). The response's api_key is the only time it's shown. |
| POST | /v1/auth/api-keys/{id}/roll | Replace a key with a new one of the same name; the old one stops working at once |
| DELETE | /v1/auth/api-keys/{id} | Revoke a key |
| POST | /v1/auth/regenerate-key | Replace your Default (oldest) key |
| POST | /v1/auth/training-preference | Opt in to or out of model training ({"training_opt_in": true}), which unlocks premium models. Opting out also opts you out of data sale. |
| POST | /v1/auth/data-sale-preference | Opt in to or out of data sale ({"data_sale_opt_in": true}), which unlocks pro models. Requires training opt-in first (409 otherwise). |
| POST | /v1/auth/eval-preference | Opt out of evaluation datasets ({"eval_dataset_opt_out": true}) |
| POST | /v1/auth/discord/membership/check | Refresh access after rejoining the Discord server |
| POST | /v1/me/leaderboard | Join or leave the public leaderboard ({"listed": true}). Joining shows your username and token totals; leaving hides them right away. |
| POST | /v1/me/delete | Delete your account after a 30-day recovery period |
Leaderboard
GET /v1/leaderboard?period=7d returns the public leaderboard and needs no key. period is 24h, 7d (default), 30d or all. sort picks the ranking: total_tokens (default), input_tokens, output_tokens, requests or estimated_value_usd; ties go to more total tokens, then more requests. Only accounts that joined are listed, by username, ranked from successful requests made with any of their keys or connected apps, Chat included. total_tokens is input + output. entries holds the top 100 by the chosen sort with rank, username, requests, input_tokens, output_tokens, reasoning_tokens, cached_tokens, total_tokens and estimated_value_usd (listed model prices; nobody is charged). ranked counts everyone ranked and combined totals them. With a login session, you gives your own numbers, your rank if you're listed, or would_rank (where you'd land) if you're not, for 24h and 7d only (would_rank_available); only you see it. Right after joining, you.pending is true while your history is counted, usually a few minutes, and you aren't ranked yet. Totals refresh every couple of minutes (refresh_seconds); generated_at is when.
App integrations
Users can grant an app specific access without sharing their password, browser session, or main API key. They can revoke its separate credential at any time.
Register your application
In Developer Apps, create an app and choose its permissions. Its public lfa_… app ID identifies the registration. Each account can have five apps; deleting one frees a slot.
Who can connect? Choose Anyone or Only you. Only you restricts approval to the creator's Logfare account. Switching to it revokes other users' connections; switching back permits new approvals without restoring revoked tokens.
App authentication defaults to App ID only, for distributed apps and plugins. Anyone knowing the ID can start a request, but account access still requires user approval. For backends or private automation, choose Require app secret: requests must also authenticate with the generated secret. Copy it when shown; Logfare stores only its hash. Keep it out of distributed apps, where it could be extracted.
Changing authentication or resetting a secret cancels unfinished connection attempts. Existing approved connections stay active. An app ID alone does not prove which executable is running; confirm that you started the connection in an app you trust.
Select permissions
Each connection can request a subset of the permissions you register. Users see and approve those exact permissions. Scopes are read-only for account data; none can change privacy choices, API keys, or account settings.
inference:chatSend text-model requests and receive responses, including streaming and tool calls.
inference:imagesGenerate and edit images using your account's available models.
inference:audioGenerate speech and transcribe audio using your account's available models.
inference:videoGenerate videos using your account's available models.
inference:embeddingsCreate embeddings using your account's available models.
usage:readView aggregate account-wide usage: totals, time charts, and breakdowns by model and API/app connection. No prompts, responses, or individual request history.
limits:readView your account's request limits and concurrency, how much of each is used right now, and when each resets. No prompts, responses, or request history.
consent:readView training and evaluation preferences, including when each was last changed. Cannot change either preference.
account:readView your Logfare user ID, username, and account creation date. No API key or account changes.
discord:readView your linked Discord user ID, whether you are in the Logfare server, and when you joined. This status remains readable after leaving the server while your Logfare account is active. No Discord token, role list, or Discord account access.
inference:chat covers chat, completions, Anthropic Messages, and Responses. Images covers generation and edits; audio covers speech and transcription. Scopes do not bypass account access, training requirements, or shared limits. /v1/models is public.
Connect an account
Secret-required apps authenticate both requests below using HTTP Basic auth: the app ID as username and app secret as password. Form-encoded client_secret with client_id is also supported; use one authentication method. Never put a secret in a URL. App ID only clients omit the secret.
- Request a device code with your app ID and registered scopes.
- Show the user code and open
verification_uri_complete; also offer the manualverification_uri. The user signs in, verifies Discord if prompted, then approves or denies. - Poll at the returned interval using the temporary
device_code. - Store the access token in the host's secure credential manager and send it as a Bearer token.
POST https://logfare.ai/v1/integrations/oauth/device_authorization Content-Type: application/x-www-form-urlencoded client_id=lfa_YOUR_APP_ID&scope=inference%3Achat%20consent%3Aread
This requests chat and read-only privacy preferences; register both first. If omitted, scope defaults to registered inference:chat. Unknown or unregistered scopes return invalid_scope.
The response includes device_code, user_code, verification_uri, verification_uri_complete, expires_in=900 (15 minutes), and interval=5 (seconds).
POST https://logfare.ai/v1/integrations/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=urn:ietf:params:oauth:grant-type:device_code&client_id=lfa_YOUR_APP_ID&device_code=DEVICE_CODE
Success returns a Bearer access token, granted scopes, and a 180-day expiry. Device codes are single-use; there is no refresh token, so reconnect after expiry or revocation.
Waiting, errors, and recovery
authorization_pending: keep polling;slow_down: add at least five seconds to the interval.- For HTTP 429, honor
Retry-After. Back off on network errors or HTTP 503, and let the user cancel. access_denied: stop. Forexpired_tokenorinvalid_grant, offer a new connection.invalid_client: check the app ID, status, and required secret. Forinvalid_scope, check registered permissions. On API 401, clear the stale token; oninsufficient_scope, request new approval.
Read approved account information
| GET endpoint | Required scope | Response |
|---|---|---|
/v1/me/usage?hours=168 | usage:read | Account-wide totals, zero-filled time buckets, model and connection breakdowns, last API use, and generation time. Connections are api (direct API key use), chat (Logfare Chat) and integration:<id> for each connected app. Windows: 24, 168 (default), 720, 2160 (90 days), 8760 (365 days), or 0 (all available history). Reports the earliest retained account request and uses weekly/monthly buckets for longer ranges. Every total also carries cached_tokens (the cache-read part of prompt_tokens), reasoning_tokens (part of completion_tokens) and estimated_value_usd (usage priced at listed model rates; not a charge). streak gives current_days (consecutive UTC days with a successful request, ending today or yesterday) and active_today. Cached for 60 seconds after checking access. |
/v1/me/limits | limits:read | The account's effective limits: tier, source (standard, probation or custom), request windows (requests and seconds; 0 is unlimited), concurrency, boost details, and usage: for each window used and resets_in (seconds), plus in_flight requests. usage is null when it can't be read. Shared network limits are not included. |
/v1/me/consent | consent:read | training_opt_in, data_sale_opt_in, eval_dataset_opt_out, and their respective training_pref_updated_at, data_sale_pref_updated_at and eval_pref_updated_at timestamps (null if never changed). |
/v1/me/profile | account:read | user_id, username, and UTC created_at. |
/v1/me/discord | discord:read | discord_user_id as a string or null, discord_is_member, and discord_joined_at (null if unlinked or unavailable). No Discord access token or role list. |
GET https://logfare.ai/v1/me/consent
Authorization: Bearer <access_token>
{"training_opt_in": false, "data_sale_opt_in": false, "eval_dataset_opt_out": false}For model selection, hide models marked requires_training_optin=true when training_opt_in=false, and models marked requires_data_sale_optin=true unless both training_opt_in and data_sale_opt_in are true (or just use premium_unlocked from /v1/models). Evaluation preference is independent and does not unlock models. Logfare still checks current access on every inference request.
The account owner's browser session also works, but a Bearer token needs its own scope. These read-only endpoints are not a Sign in with Logfare service: browser callbacks and identity tokens are not provided. Deactivation revokes connections. Leaving the Logfare Discord server blocks inference and account reads until access is restored; discord:read can still report membership for an active account.
Permissions and connection lifecycle
Changing an app's permissions never silently expands existing credentials. Removing a scope removes it from credentials and invalidates pending requests that need it. Users can revoke connections individually; disabling or deleting an app revokes all of them. Revoked credentials stay revoked, while usage attribution is retained.
Developers see connection totals, not users' credentials, prompts, responses, or request history. Account data requires a user's approved token with the matching scope.
Connect and make a test request
Run your integration's normal setup or connect command, approve the requested permissions in Logfare, then select a Logfare model in the integration. For an OpenAI-compatible client, use this configuration:
Base URL: https://logfare.ai/v1 API credential: the access token returned after approval Model: logfare/auto
Keep /v1 exactly once in the base URL. Test with a short chat request, then review the connection and usage in your dashboard. Revoke test connections you no longer need.
Use HTTPS outside loopback development. Never log device codes or access tokens or put them in URLs. The protocol follows the OAuth device authorization grant.
Help & community
For questions, bug reports, feature ideas and model requests, or to talk with other users, join r/Logfare or the Logfare Discord.
Never post API keys, access tokens or private details publicly. For problems with your own account, open a support ticket in the Discord instead of posting on Reddit.