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
On this page
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.
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | No | Filter 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" } ] }
| Field | Type | Description |
|---|---|---|
| models | array | The models, cheapest from_credits first, models with no default price last. Each item has the same shape as a single model read |
| models[].id | string | The model id, sent in the model field |
| models[].name | string | The display name |
| models[].name_he | string | A Hebrew name, only on models that have one |
| models[].category | string | video, image, audio or analysis |
| models[].modes | array | What 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[].params | array | Every 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[].key | string | The parameter name as sent in params |
| models[].params[].type | string | enum, number, boolean, text, image, images, audio or video. Each type is explained on the jobs page |
| models[].params[].values | array | The allowed values, enum only |
| models[].params[].min | number | The lowest value, numbers only |
| models[].params[].max | number | The highest value for numbers, or the most links for images |
| models[].params[].step | number | The step between values, on numbers that have one |
| models[].params[].default | any | The value used when the parameter is left out |
| models[].params[].required | boolean | true when the parameter must be sent |
| models[].params[].label | object | A display label in Hebrew and English: { he, en } |
| models[].params[].max_length | integer | For text: the most characters the model accepts |
| models[].params[].max_seconds | integer | For the input video of an analysis model: the longest clip in seconds |
| models[].guide | object | A short guide: best_for, strengths, and hebrew with level (good, none or unknown), what and note. May be null |
| models[].available | boolean | true when the model can run right now |
| models[].from_credits | number | The price in credits of one generation at the default settings. It is not a minimum. null when the defaults cannot be priced |
| models[].price_basis | string | How 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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The 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" }
| Field | Type | Description |
|---|---|---|
| id | string | The model id, sent in the model field |
| name | string | The display name |
| name_he | string | A Hebrew name, only on models that have one |
| category | string | video, image, audio or analysis |
| modes | array | What 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 |
| params | array | Every 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[].key | string | The parameter name as sent in params |
| params[].type | string | enum, number, boolean, text, image, images, audio or video. Each type is explained on the jobs page |
| params[].values | array | The allowed values, enum only |
| params[].min | number | The lowest value, numbers only |
| params[].max | number | The highest value for numbers, or the most links for images |
| params[].step | number | The step between values, on numbers that have one |
| params[].default | any | The value used when the parameter is left out |
| params[].required | boolean | true when the parameter must be sent |
| params[].label | object | A display label in Hebrew and English: { he, en } |
| params[].max_length | integer | For text: the most characters the model accepts |
| params[].max_seconds | integer | For the input video of an analysis model: the longest clip in seconds |
| guide | object | A short guide: best_for, strengths, and hebrew with level (good, none or unknown), what and note. May be null |
| available | boolean | true when the model can run right now |
| from_credits | number | The price in credits of one generation at the default settings. It is not a minimum. null when the defaults cannot be priced |
| price_basis | string | How 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.
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | The model id |
| params | object | No | The model parameters, as listed by get model (Default: {}) |
| variants | array | No | A 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" } }
| Field | Type | Description |
|---|---|---|
| model | string | The model id |
| credits | number | The exact price in credits |
| params | object | The normalized parameters, defaults included |
| variants | array | Only 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.
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | The model id |
| params | object | No | The model parameters. An unknown key is refused (Default: {}) |
| max_credits | number | Yes | The 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 |
| source | string | No | A 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 }
| Field | Type | Description |
|---|---|---|
| id | string | The job id (UUID) |
| model_id | string | The id of the model that ran |
| params | object | The normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent |
| status | string | queued, running, succeeded or failed. Explained in full on the job lifecycle page |
| credits | number | The price charged, in credits, up to 2 decimals |
| error | string | generation_failed when the job failed, otherwise null. The internal cause is never exposed |
| refunded | boolean | true when the credits were returned: on every failed job, and on a job the team refunded by hand |
| files | array | The output files, in order. Empty until the job succeeds |
| files[].id | string | The file id |
| files[].mime | string | The file type, such as video/mp4 or image/png |
| files[].bytes | integer | The file size in bytes |
| files[].created_at | string | When the file was stored (ISO 8601) |
| files[].url | string | A signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link |
| source | string | Where the job was sent from: web, api, cli or mcp |
| created_at | string | When the job was created and charged (ISO 8601) |
| finished_at | string | When 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.
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | How 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) |
| before | string | No | Cursor 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" } ] }
| Field | Type | Description |
|---|---|---|
| jobs | array | The jobs, in the same shape as a single job, without report |
| jobs[].id | string | The job id (UUID) |
| jobs[].model_id | string | The id of the model that ran |
| jobs[].params | object | The normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent |
| jobs[].status | string | queued, running, succeeded or failed. Explained in full on the job lifecycle page |
| jobs[].credits | number | The price charged, in credits, up to 2 decimals |
| jobs[].error | string | generation_failed when the job failed, otherwise null. The internal cause is never exposed |
| jobs[].refunded | boolean | true when the credits were returned: on every failed job, and on a job the team refunded by hand |
| jobs[].files | array | The output files, in order. Empty until the job succeeds |
| jobs[].files[].id | string | The file id |
| jobs[].files[].mime | string | The file type, such as video/mp4 or image/png |
| jobs[].files[].bytes | integer | The file size in bytes |
| jobs[].files[].created_at | string | When the file was stored (ISO 8601) |
| jobs[].files[].url | string | A signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link |
| jobs[].source | string | Where the job was sent from: web, api, cli or mcp |
| jobs[].created_at | string | When the job was created and charged (ISO 8601) |
| jobs[].finished_at | string | When 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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The 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" }
| Field | Type | Description |
|---|---|---|
| id | string | The job id (UUID) |
| model_id | string | The id of the model that ran |
| params | object | The normalized parameters: defaults filled in, numbers and booleans coerced. These are exactly the values that were priced and sent |
| status | string | queued, running, succeeded or failed. Explained in full on the job lifecycle page |
| credits | number | The price charged, in credits, up to 2 decimals |
| error | string | generation_failed when the job failed, otherwise null. The internal cause is never exposed |
| refunded | boolean | true when the credits were returned: on every failed job, and on a job the team refunded by hand |
| files | array | The output files, in order. Empty until the job succeeds |
| files[].id | string | The file id |
| files[].mime | string | The file type, such as video/mp4 or image/png |
| files[].bytes | integer | The file size in bytes |
| files[].created_at | string | When the file was stored (ISO 8601) |
| files[].url | string | A signed link to the file, valid for 30 days from when it was made. Every read returns a fresh link |
| source | string | Where the job was sent from: web, api, cli or mcp |
| created_at | string | When the job was created and charged (ISO 8601) |
| finished_at | string | When the job finished, or null while it is open |
| report | object | Only 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.
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | How many files to return (Range: 1..200 · Default: 60) |
| before | string | No | Cursor for the next page: the created_at of the last file you saw |
| before_id | string | No | The 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 } }
| Field | Type | Description |
|---|---|---|
| files | array | The files |
| files[].id | string | The file id |
| files[].job_id | string | The job that made the file, or null for an upload |
| files[].mime | string | The file type |
| files[].bytes | integer | Size in bytes |
| files[].created_at | string | When it was stored |
| files[].url | string | A signed link, valid for 30 days |
| storage | object | Storage use |
| storage.bytes | integer | Everything stored on the account, in bytes |
| storage.free_bytes | integer | The free storage: 1073741824 bytes, that is 1 GB |
| storage.over_bytes | integer | How many bytes are above the free 1 GB |
| storage.monthly_ils | number | The monthly storage fee in shekels at the current size, 0 up to 1 GB |
| storage.blocked | boolean | true 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.
| Name | Type | Required | Description |
|---|---|---|---|
| file | string | Yes | The 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>" }
| Field | Type | Description |
|---|---|---|
| id | string | The file id |
| mime | string | The file type |
| bytes | integer | Size in bytes |
| url | string | A 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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The 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 }
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always 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.
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 } }
| Field | Type | Description |
|---|---|---|
| id | string | The account id |
| string | The email address | |
| name | string | The display name |
| lang | string | Interface language: he or en |
| theme | string | The website colour theme |
| is_admin | boolean | Whether the account is an admin account |
| balance_cc | integer | The balance in hundredths of a credit (100 = one credit) |
| credits | number | The balance in credits |
| created_at | string | When the account was opened |
| storage | object | Storage use |
| storage.bytes | integer | Everything stored on the account, in bytes |
| storage.free_bytes | integer | The free storage: 1073741824 bytes, that is 1 GB |
| storage.over_bytes | integer | How many bytes are above the free 1 GB |
| storage.monthly_ils | number | The monthly storage fee in shekels at the current size, 0 up to 1 GB |
| storage.blocked | boolean | true 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.
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Display name. Trimmed, and cut at 80 characters (Up to 80 characters) |
| lang | string | No | Interface language (Values: he, en) |
| theme | string | No | The 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 } }
| Field | Type | Description |
|---|---|---|
| (all) | object | The 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.
| Name | Type | Required | Description |
|---|---|---|---|
| confirm_email | string | Yes | The account email, as confirmation |
| current_password | string | Yes | The 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 }
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always 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.
| Name | Type | Required | Description |
|---|---|---|---|
| current_password | string | Yes | The current password |
| new_password | string | Yes | The 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 }
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always true |
| sessions_ended | integer | How 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.
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 }
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always true |
| sessions_ended | integer | How 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.
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 } ] }
| Field | Type | Description |
|---|---|---|
| keys | array | The active keys. Revoked keys are left out |
| keys[].id | string | The key id, used to revoke it |
| keys[].prefix | string | The first 10 characters of the key, to recognise it |
| keys[].name | string | The name you gave it. An OAuth connection is named after the app, followed by (OAuth) |
| keys[].created_at | string | When it was created |
| keys[].last_used_at | string | Last 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.
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | A 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>" }
| Field | Type | Description |
|---|---|---|
| id | string | The key id |
| key | string | The 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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The 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 }
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always 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.
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | How many rows to return (Range: 1..200 · Default: 50) |
| before | string | No | Cursor 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 } ] }
| Field | Type | Description |
|---|---|---|
| ledger | array | The rows |
| ledger[].id | integer | The row id |
| ledger[].kind | string | charge for a job, refund, topup, storage for a daily storage fee, grant, adjust for a manual correction |
| ledger[].ref | string | For a charge or refund: the job id. For storage: the date YYYY-MM-DD. May be null |
| ledger[].note | string | For a charge: the model name. For a refund: refund. For storage: the size |
| ledger[].created_at | string | When it happened |
| ledger[].delta_credits | number | The 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.
Example
curl https://low-cost.ai/api/health
Response 200
{ "ok": true, "db_ms": 42, "demo": false }
| Field | Type | Description |
|---|---|---|
| ok | boolean | true when the database answered. When it did not answer within 3 seconds the status is 503 and ok is false |
| db_ms | number | The database round trip in milliseconds, or null when ok is false |
| demo | boolean | true in demo mode, where generations are simulated |
All error codes (31)