LOW COST AI
עב

Full API reference

Every request goes to the base URL with an API key in the Authorization header. Responses are JSON. Each endpoint below says what it does, what to send, what comes back and which errors can occur

Base URL: https://low-cost.aiOpenAPI file

On this page
  1. Models
  2. Pricing and generation
  3. Jobs
  4. Files and library
  5. Account
  6. API keys
  7. Credit history
  8. Health check

Models

List models

GET /api/v1/models

Every model available right now, with the price of one generation at its default settings. Open to everyone, no key needed. Use it to pick a model and get its id.

Authentication: No authenticationFree

Query parameters
NameTypeRequiredDescription
categorystringNoFilter by category. Without it every model comes back (Values: video, image, audio, analysis)

Example

curl "https://low-cost.ai/api/v1/models?category=video"

Response 200

{ "models": [ { "id": "kling-3.0", "name": "Kling 3.0", "category": "video", "modes": [ "text-to-video", "image-to-video" ], "params": [ { "key": "prompt", "type": "text", "required": true, "label": { "he": "...", "en": "..." }, "max_length": 2500 }, { "key": "duration", "type": "enum", "values": [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], "default": 5, "label": { "he": "...", "en": "..." } }, { "key": "aspect_ratio", "type": "enum", "values": [ "16:9", "9:16", "1:1" ], "default": "16:9", "label": { "he": "...", "en": "..." } } ], "guide": { "best_for": { "he": "...", "en": "..." }, "strengths": { "he": [ "..." ], "en": [ "..." ] }, "hebrew": { "level": "unknown", "what": null, "note": { "he": "...", "en": "..." } } }, "available": true, "from_credits": 12.5, "price_basis": "per_second" } ] }

Response fields
FieldTypeDescription
modelsarrayThe models, cheapest from_credits first, models with no default price last. Each item has the same shape as a single model read
models[].idstringThe model id, sent in the model field
models[].namestringThe display name
models[].name_hestringA Hebrew name, only on models that have one
models[].categorystringvideo, image, audio or analysis
models[].modesarrayWhat the model can do: text-to-video, image-to-video, reference-to-video, video-to-video, text-to-image, image-edit, image-to-image, text-to-music, text-to-speech, video-analysis
models[].paramsarrayEvery parameter the model accepts right now. Each item: key, type, label, and where relevant values, min, max, step, default, required, max_length, max_seconds
models[].params[].keystringThe parameter name as sent in params
models[].params[].typestringenum, number, boolean, text, image, images, audio or video. Each type is explained on the jobs page
models[].params[].valuesarrayThe allowed values, enum only
models[].params[].minnumberThe lowest value, numbers only
models[].params[].maxnumberThe highest value for numbers, or the most links for images
models[].params[].stepnumberThe step between values, on numbers that have one
models[].params[].defaultanyThe value used when the parameter is left out
models[].params[].requiredbooleantrue when the parameter must be sent
models[].params[].labelobjectA display label in Hebrew and English: { he, en }
models[].params[].max_lengthintegerFor text: the most characters the model accepts
models[].params[].max_secondsintegerFor the input video of an analysis model: the longest clip in seconds
models[].guideobjectA short guide: best_for, strengths, and hebrew with level (good, none or unknown), what and note. May be null
models[].availablebooleantrue when the model can run right now
models[].from_creditsnumberThe price in credits of one generation at the default settings. It is not a minimum. null when the defaults cannot be priced
models[].price_basisstringHow to read from_credits: per_clip, per_second, per_image, per_1k_chars, per_track or per_check

Possible errors: server_error

Get one model and its parameters

GET /api/v1/models/{id}

Every parameter the model accepts: name, type, allowed values, default, range and maximum length. This is the only way to know what may go into params for a given model.

Authentication: No authenticationFree

Path parameters
NameTypeRequiredDescription
idstringYesThe model id, such as kling-3.0 or nano-banana-pro

Example

curl https://low-cost.ai/api/v1/models/kling-3.0

Response 200

{ "id": "kling-3.0", "name": "Kling 3.0", "category": "video", "modes": [ "text-to-video", "image-to-video" ], "params": [ { "key": "prompt", "type": "text", "required": true, "label": { "he": "...", "en": "..." }, "max_length": 2500 }, { "key": "duration", "type": "enum", "values": [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], "default": 5, "label": { "he": "...", "en": "..." } }, { "key": "aspect_ratio", "type": "enum", "values": [ "16:9", "9:16", "1:1" ], "default": "16:9", "label": { "he": "...", "en": "..." } } ], "guide": { "best_for": { "he": "...", "en": "..." }, "strengths": { "he": [ "..." ], "en": [ "..." ] }, "hebrew": { "level": "unknown", "what": null, "note": { "he": "...", "en": "..." } } }, "available": true, "from_credits": 12.5, "price_basis": "per_second" }

Response fields
FieldTypeDescription
idstringThe model id, sent in the model field
namestringThe display name
name_hestringA Hebrew name, only on models that have one
categorystringvideo, image, audio or analysis
modesarrayWhat the model can do: text-to-video, image-to-video, reference-to-video, video-to-video, text-to-image, image-edit, image-to-image, text-to-music, text-to-speech, video-analysis
paramsarrayEvery parameter the model accepts right now. Each item: key, type, label, and where relevant values, min, max, step, default, required, max_length, max_seconds
params[].keystringThe parameter name as sent in params
params[].typestringenum, number, boolean, text, image, images, audio or video. Each type is explained on the jobs page
params[].valuesarrayThe allowed values, enum only
params[].minnumberThe lowest value, numbers only
params[].maxnumberThe highest value for numbers, or the most links for images
params[].stepnumberThe step between values, on numbers that have one
params[].defaultanyThe value used when the parameter is left out
params[].requiredbooleantrue when the parameter must be sent
params[].labelobjectA display label in Hebrew and English: { he, en }
params[].max_lengthintegerFor text: the most characters the model accepts
params[].max_secondsintegerFor the input video of an analysis model: the longest clip in seconds
guideobjectA short guide: best_for, strengths, and hebrew with level (good, none or unknown), what and note. May be null
availablebooleantrue when the model can run right now
from_creditsnumberThe price in credits of one generation at the default settings. It is not a minimum. null when the defaults cannot be priced
price_basisstringHow to read from_credits: per_clip, per_second, per_image, per_1k_chars, per_track or per_check

Possible errors: not_found, server_error

Pricing and generation

Estimate a price

POST /api/v1/estimate

The exact price in credits for a model and parameters. Free, charges nothing and needs no key. Parameters are checked exactly as in a generation, so an estimate that passes is also a check that the request is valid.

Authentication: No authenticationFree

Request body
NameTypeRequiredDescription
modelstringYesThe model id
paramsobjectNoThe model parameters, as listed by get model (Default: {})
variantsarrayNoA list of partial parameter sets. Each is laid over params and priced on its own. Only the first 24 are used

Example

curl -X POST https://low-cost.ai/api/v1/estimate \ -H "Content-Type: application/json" \ -d '{"model":"kling-3.0","params":{"prompt":"Tel Aviv street after rain","duration":5,"aspect_ratio":"9:16"}}'

Response 200

{ "model": "kling-3.0", "credits": 12.5, "params": { "prompt": "Tel Aviv street after rain", "duration": 5, "aspect_ratio": "9:16" } }

Response fields
FieldTypeDescription
modelstringThe model id
creditsnumberThe exact price in credits
paramsobjectThe normalized parameters, defaults included
variantsarrayOnly when you sent variants: { params, credits } for each. A variant that cannot be priced returns credits: null, error: invalid_params and param

Possible errors: invalid_params, not_found, rate_limited, server_error

Generate

POST /api/v1/generate

Charges the price and starts a job, that is one generation running in the background. The answer comes back at once with the job id, and you get the result by reading the job until it finishes.

Authentication: API key or a website sign-inSpends credits

Request body
NameTypeRequiredDescription
modelstringYesThe model id
paramsobjectNoThe model parameters. An unknown key is refused (Default: {})
max_creditsnumberYesThe most you agree to pay. Must be a positive number. If the actual price is higher, the request is refused and nothing is charged. Send the price you got from estimate
sourcestringNoA tag stored on the job. Any other value is stored as api. A website session is always web (Values: cli, mcp)

Example

curl -X POST https://low-cost.ai/api/v1/generate \ -H "Authorization: Bearer $LCA_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"kling-3.0","params":{"prompt":"Tel Aviv street after rain","duration":5,"aspect_ratio":"9:16"},"max_credits":12.5}'

Response 201

{ "id": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "model_id": "kling-3.0", "params": { "prompt": "Tel Aviv street after rain", "duration": 5, "aspect_ratio": "9:16" }, "status": "queued", "credits": 12.5, "error": null, "refunded": false, "files": [], "source": "api", "created_at": "2026-11-23T17:00:00.000Z", "finished_at": null }

Response fields
FieldTypeDescription
idstringThe job id (UUID)
model_idstringThe id of the model that ran
paramsobjectThe normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent
statusstringqueued, running, succeeded or failed. Explained in full on the job lifecycle page
creditsnumberThe price charged, in credits, up to 2 decimals
errorstringgeneration_failed when the job failed, otherwise null. The internal cause is never exposed
refundedbooleantrue when the credits were returned: on every failed job, and on a job the team refunded by hand
filesarrayThe output files, in order. Empty until the job succeeds
files[].idstringThe file id
files[].mimestringThe file type, such as video/mp4 or image/png
files[].bytesintegerThe file size in bytes
files[].created_atstringWhen the file was stored (ISO 8601)
files[].urlstringA signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link
sourcestringWhere the job was sent from: web, api, cli or mcp
created_atstringWhen the job was created and charged (ISO 8601)
finished_atstringWhen the job finished, or null while it is open

Possible errors: unauthorized, account_blocked, bad_origin, rate_limited, invalid_params, not_found, price_above_cap, insufficient_credits, storage_payment_required, server_error

Jobs

List jobs

GET /api/v1/jobs

Your jobs, newest first, with file links. Before the list comes back, up to 10 open jobs are moved forward, so the call itself also updates their status.

Authentication: API key or a website sign-inFree

Query parameters
NameTypeRequiredDescription
limitintegerNoHow many jobs to return. A value out of range is clamped, a value that is not a number becomes 50 (Range: 1..100 · Default: 50)
beforestringNoCursor for the next page: the created_at of the last job you saw (ISO 8601). Only jobs created before it come back

Example

curl "https://low-cost.ai/api/v1/jobs?limit=20" -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "jobs": [ { "id": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "model_id": "kling-3.0", "params": { "prompt": "Tel Aviv street after rain", "duration": 5, "aspect_ratio": "9:16" }, "status": "succeeded", "credits": 12.5, "error": null, "refunded": false, "files": [ { "id": "0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90", "mime": "video/mp4", "bytes": 5242880, "created_at": "2026-11-23T17:01:10.000Z", "url": "https://low-cost.ai/f/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90?t=<signature>&e=<day>" } ], "source": "api", "created_at": "2026-11-23T17:00:00.000Z", "finished_at": "2026-11-23T17:01:10.000Z" } ] }

Response fields
FieldTypeDescription
jobsarrayThe jobs, in the same shape as a single job, without report
jobs[].idstringThe job id (UUID)
jobs[].model_idstringThe id of the model that ran
jobs[].paramsobjectThe normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent
jobs[].statusstringqueued, running, succeeded or failed. Explained in full on the job lifecycle page
jobs[].creditsnumberThe price charged, in credits, up to 2 decimals
jobs[].errorstringgeneration_failed when the job failed, otherwise null. The internal cause is never exposed
jobs[].refundedbooleantrue when the credits were returned: on every failed job, and on a job the team refunded by hand
jobs[].filesarrayThe output files, in order. Empty until the job succeeds
jobs[].files[].idstringThe file id
jobs[].files[].mimestringThe file type, such as video/mp4 or image/png
jobs[].files[].bytesintegerThe file size in bytes
jobs[].files[].created_atstringWhen the file was stored (ISO 8601)
jobs[].files[].urlstringA signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link
jobs[].sourcestringWhere the job was sent from: web, api, cli or mcp
jobs[].created_atstringWhen the job was created and charged (ISO 8601)
jobs[].finished_atstringWhen the job finished, or null while it is open

Possible errors: unauthorized, account_blocked, invalid_params, server_error

Get one job

GET /api/v1/jobs/{id}

A job's status, file links once it is ready, and for a succeeded analysis job its report too. This is the call you repeat until the job finishes, and each call also moves the job forward.

Authentication: API key or a website sign-inFree

Path parameters
NameTypeRequiredDescription
idstringYesThe job id returned by generate

Example

curl https://low-cost.ai/api/v1/jobs/6f1c2e0a-1b2c-4d5e-8f90-123456789abc -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "id": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "model_id": "kling-3.0", "params": { "prompt": "Tel Aviv street after rain", "duration": 5, "aspect_ratio": "9:16" }, "status": "succeeded", "credits": 12.5, "error": null, "refunded": false, "files": [ { "id": "0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90", "mime": "video/mp4", "bytes": 5242880, "created_at": "2026-11-23T17:01:10.000Z", "url": "https://low-cost.ai/f/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90?t=<signature>&e=<day>" } ], "source": "api", "created_at": "2026-11-23T17:00:00.000Z", "finished_at": "2026-11-23T17:01:10.000Z" }

Response fields
FieldTypeDescription
idstringThe job id (UUID)
model_idstringThe id of the model that ran
paramsobjectThe normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent
statusstringqueued, running, succeeded or failed. Explained in full on the job lifecycle page
creditsnumberThe price charged, in credits, up to 2 decimals
errorstringgeneration_failed when the job failed, otherwise null. The internal cause is never exposed
refundedbooleantrue when the credits were returned: on every failed job, and on a job the team refunded by hand
filesarrayThe output files, in order. Empty until the job succeeds
files[].idstringThe file id
files[].mimestringThe file type, such as video/mp4 or image/png
files[].bytesintegerThe file size in bytes
files[].created_atstringWhen the file was stored (ISO 8601)
files[].urlstringA signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link
sourcestringWhere the job was sent from: web, api, cli or mcp
created_atstringWhen the job was created and charged (ISO 8601)
finished_atstringWhen the job finished, or null while it is open
reportobjectOnly on a succeeded analysis job: the analysis report. Fields on the jobs page

Possible errors: unauthorized, account_blocked, not_found, server_error

Files and library

List library files

GET /api/v1/files

All your files, both uploads and generated outputs, newest first, together with your storage use.

Authentication: API key or a website sign-inFree

Query parameters
NameTypeRequiredDescription
limitintegerNoHow many files to return (Range: 1..200 · Default: 60)
beforestringNoCursor for the next page: the created_at of the last file you saw
before_idstringNoThe id of the last file you saw. Send it with before, because the files of one job share a created_at

Example

curl "https://low-cost.ai/api/v1/files?limit=50" -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "files": [ { "id": "0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90", "job_id": null, "mime": "image/png", "bytes": 345678, "created_at": "2026-11-23T16:00:00.000Z", "url": "https://low-cost.ai/f/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90?t=<signature>&e=<day>" } ], "storage": { "bytes": 345678, "free_bytes": 1073741824, "over_bytes": 0, "monthly_ils": 0, "blocked": false } }

Response fields
FieldTypeDescription
filesarrayThe files
files[].idstringThe file id
files[].job_idstringThe job that made the file, or null for an upload
files[].mimestringThe file type
files[].bytesintegerSize in bytes
files[].created_atstringWhen it was stored
files[].urlstringA signed link, valid for 30 days
storageobjectStorage use
storage.bytesintegerEverything stored on the account, in bytes
storage.free_bytesintegerThe free storage: 1073741824 bytes, that is 1 GB
storage.over_bytesintegerHow many bytes are above the free 1 GB
storage.monthly_ilsnumberThe monthly storage fee in shekels at the current size, 0 up to 1 GB
storage.blockedbooleantrue when the account is held for unpaid storage. See storage_payment_required

Possible errors: unauthorized, account_blocked, invalid_params, server_error

Upload an input file

POST /api/v1/files

Uploads a file from your computer, such as a start frame, a reference image, audio or a video, and returns a link you can pass to a model as a parameter. Models take files only as links, so this is how you use a local file.

Authentication: API key or a website sign-inFree

Request body
NameTypeRequiredDescription
filestringYesThe file, in a field named file. Up to 4 MB. Types: image/png, image/jpeg, image/webp, image/gif, video/mp4, video/webm, video/quicktime, audio/mpeg, audio/wav, audio/x-wav, audio/ogg, audio/mp4, audio/flac. The start of the file must match the declared type

Example

curl -X POST https://low-cost.ai/api/v1/files \ -H "Authorization: Bearer $LCA_KEY" \ -F "file=@frame.png;type=image/png"

Response 201

{ "id": "0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90", "mime": "image/png", "bytes": 345678, "url": "https://low-cost.ai/f/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90?t=<signature>&e=<day>" }

Response fields
FieldTypeDescription
idstringThe file id
mimestringThe file type
bytesintegerSize in bytes
urlstringA signed link, valid for 30 days. Pass it as the value of a parameter such as image or images

Possible errors: unauthorized, account_blocked, bad_origin, rate_limited, too_large, no_file, unsupported_type, quota_exceeded, storage_payment_required, server_error

Delete a file

DELETE /api/v1/files/{id}

Permanently deletes one file from the library and from storage. Works on output files too: the job stays, and the file leaves its files list.

Authentication: API key or a website sign-inFree

Path parameters
NameTypeRequiredDescription
idstringYesThe file id

Example

curl -X DELETE https://low-cost.ai/api/v1/files/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90 -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "ok": true }

Response fields
FieldTypeDescription
okbooleanAlways true

Possible errors: unauthorized, account_blocked, bad_origin, not_found, server_error

Account

Get account and balance

GET /api/v1/me

Account details, credit balance and storage use. The way to check your balance before a generation.

Authentication: API key or a website sign-inFree

Example

curl https://low-cost.ai/api/v1/me -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "id": "3c9e1a52-8b4d-4f7e-a1c2-5d6e7f8091ab", "email": "user@example.com", "name": "", "lang": "he", "theme": "graphite", "is_admin": false, "balance_cc": 10000, "credits": 100, "created_at": "2026-11-01T10:00:00.000Z", "storage": { "bytes": 345678, "free_bytes": 1073741824, "over_bytes": 0, "monthly_ils": 0, "blocked": false } }

Response fields
FieldTypeDescription
idstringThe account id
emailstringThe email address
namestringThe display name
langstringInterface language: he or en
themestringThe website colour theme
is_adminbooleanWhether the account is an admin account
balance_ccintegerThe balance in hundredths of a credit (100 = one credit)
creditsnumberThe balance in credits
created_atstringWhen the account was opened
storageobjectStorage use
storage.bytesintegerEverything stored on the account, in bytes
storage.free_bytesintegerThe free storage: 1073741824 bytes, that is 1 GB
storage.over_bytesintegerHow many bytes are above the free 1 GB
storage.monthly_ilsnumberThe monthly storage fee in shekels at the current size, 0 up to 1 GB
storage.blockedbooleantrue when the account is held for unpaid storage. See storage_payment_required

Possible errors: unauthorized, account_blocked, server_error

Update account details

PATCH /api/v1/me

Changes the display name, interface language or colour theme. Send only the fields you want to change.

Authentication: API key or a website sign-inFree

Request body
NameTypeRequiredDescription
namestringNoDisplay name. Trimmed, and cut at 80 characters (Up to 80 characters)
langstringNoInterface language (Values: he, en)
themestringNoThe website colour theme (Values: graphite, midnight, board, fog, paper, porcelain, linen, dawn)

Example

curl -X PATCH https://low-cost.ai/api/v1/me \ -H "Authorization: Bearer $LCA_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"Dana","lang":"en"}'

Response 200

{ "id": "3c9e1a52-8b4d-4f7e-a1c2-5d6e7f8091ab", "email": "user@example.com", "name": "Dana", "lang": "en", "theme": "graphite", "is_admin": false, "balance_cc": 10000, "credits": 100, "created_at": "2026-11-01T10:00:00.000Z", "storage": { "bytes": 345678, "free_bytes": 1073741824, "over_bytes": 0, "monthly_ils": 0, "blocked": false } }

Response fields
FieldTypeDescription
(all)objectThe same shape as get account

Possible errors: unauthorized, account_blocked, bad_origin, invalid_params, server_error

Delete the account

DELETE /api/v1/me

Permanently deletes the account and every file. Available only from the signed-in website, not with an API key, so a leaked key cannot erase an account.

Authentication: Website sign-in onlyFree

Request body
NameTypeRequiredDescription
confirm_emailstringYesThe account email, as confirmation
current_passwordstringYesThe account password

Example

# Deleting the account works only from a signed-in website session, not with an API key. # Do it on https://low-cost.ai/developers or https://low-cost.ai/settings

Response 200

{ "ok": true }

Response fields
FieldTypeDescription
okbooleanAlways true. The website session ends

Possible errors: unauthorized, account_blocked, bad_origin, web_session_required, invalid_params, confirm_email_mismatch, rate_limited, wrong_password, payment_pending, server_error

Change the password

POST /api/v1/me/password

Changes the password and signs out every other website session. Website only. API keys are not affected.

Authentication: Website sign-in onlyFree

Request body
NameTypeRequiredDescription
current_passwordstringYesThe current password
new_passwordstringYesThe new password: at least 10 characters, not one repeated character and not a common password

Example

# Changing the password works only from a signed-in website session, not with an API key. # Do it on https://low-cost.ai/developers or https://low-cost.ai/settings

Response 200

{ "ok": true, "sessions_ended": 2 }

Response fields
FieldTypeDescription
okbooleanAlways true
sessions_endedintegerHow many other sessions were signed out

Possible errors: unauthorized, account_blocked, bad_origin, web_session_required, invalid_params, rate_limited, wrong_password, weak_password, password_too_long, server_error

Sign out other sessions

DELETE /api/v1/me/sessions

Signs out every website session except the one making the request. Website only.

Authentication: Website sign-in onlyFree

Example

# Signing out other sessions works only from a signed-in website session, not with an API key. # Do it on https://low-cost.ai/developers or https://low-cost.ai/settings

Response 200

{ "ok": true, "sessions_ended": 3 }

Response fields
FieldTypeDescription
okbooleanAlways true
sessions_endedintegerHow many sessions were signed out

Possible errors: unauthorized, account_blocked, bad_origin, web_session_required, server_error

API keys

List API keys

GET /api/v1/keys

The account's active keys, newest first. The key itself is never returned, only its first 10 characters.

Authentication: API key or a website sign-inFree

Example

curl https://low-cost.ai/api/v1/keys -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "keys": [ { "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d", "prefix": "lca_AbCdEf", "name": "Work laptop", "created_at": "2026-11-20T10:00:00.000Z", "last_used_at": null } ] }

Response fields
FieldTypeDescription
keysarrayThe active keys. Revoked keys are left out
keys[].idstringThe key id, used to revoke it
keys[].prefixstringThe first 10 characters of the key, to recognise it
keys[].namestringThe name you gave it. An OAuth connection is named after the app, followed by (OAuth)
keys[].created_atstringWhen it was created
keys[].last_used_atstringLast use, or null if never used

Possible errors: unauthorized, account_blocked, server_error

Create an API key

POST /api/v1/keys

Creates a new API key and returns it only once. Website only, on the developers page: a key cannot create keys, so a leaked key cannot spread itself.

Authentication: Website sign-in onlyFree

Request body
NameTypeRequiredDescription
namestringNoA name to recognise the key, for example after the computer or tool. Cut at 60 characters (Up to 60 characters · Default: )

Example

# Creating a key works only from a signed-in website session, not with an API key. # Do it on https://low-cost.ai/developers or https://low-cost.ai/settings

Response 201

{ "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d", "key": "lca_<32 characters>" }

Response fields
FieldTypeDescription
idstringThe key id
keystringThe full key, lca_ followed by 32 characters. Shown only here, never again

Possible errors: unauthorized, account_blocked, bad_origin, web_session_required, rate_limited, too_many_keys, invalid_params, server_error

Revoke an API key

DELETE /api/v1/keys/{id}

Revokes a key at once. Every tool that uses it, an app connected with OAuth included, stops working. Website only.

Authentication: Website sign-in onlyFree

Path parameters
NameTypeRequiredDescription
idstringYesThe key id from the key list

Example

# Revoking a key works only from a signed-in website session, not with an API key. # Do it on https://low-cost.ai/developers or https://low-cost.ai/settings

Response 200

{ "ok": true }

Response fields
FieldTypeDescription
okbooleanAlways true

Possible errors: unauthorized, account_blocked, bad_origin, web_session_required, not_found, server_error

Credit history

List credit history

GET /api/v1/ledger

Every balance movement, newest first: charges, refunds, top-ups, storage fees and grants. This is how you reconcile jobs with charges.

Authentication: API key or a website sign-inFree

Query parameters
NameTypeRequiredDescription
limitintegerNoHow many rows to return (Range: 1..200 · Default: 50)
beforestringNoCursor for the next page: the id of the last row you saw, a number of up to 18 digits

Example

curl "https://low-cost.ai/api/v1/ledger?limit=100" -H "Authorization: Bearer $LCA_KEY"

Response 200

{ "ledger": [ { "id": 1235, "kind": "refund", "ref": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "note": "refund", "created_at": "2026-11-23T17:20:00.000Z", "delta_credits": 12.5 }, { "id": 1234, "kind": "charge", "ref": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "note": "Kling 3.0", "created_at": "2026-11-23T17:00:00.000Z", "delta_credits": -12.5 } ] }

Response fields
FieldTypeDescription
ledgerarrayThe rows
ledger[].idintegerThe row id
ledger[].kindstringcharge for a job, refund, topup, storage for a daily storage fee, grant, adjust for a manual correction
ledger[].refstringFor a charge or refund: the job id. For storage: the date YYYY-MM-DD. May be null
ledger[].notestringFor a charge: the model name. For a refund: refund. For storage: the size
ledger[].created_atstringWhen it happened
ledger[].delta_creditsnumberThe change in credits. Negative means spent

Possible errors: unauthorized, account_blocked, invalid_params, server_error

Health check

Health check

GET /api/health

Whether the service and its database answer. Meant for monitoring tools. Open to everyone, no key needed.

Authentication: No authenticationFree

Example

curl https://low-cost.ai/api/health

Response 200

{ "ok": true, "db_ms": 42, "demo": false }

Response fields
FieldTypeDescription
okbooleantrue when the database answered. When it did not answer within 3 seconds the status is 503 and ok is false
db_msnumberThe database round trip in milliseconds, or null when ok is false
demobooleantrue in demo mode, where generations are simulated

All error codes (31)