LOW COST AI
עב

Quickstart

This page takes you from zero to a finished file: an API key, the model list, a price estimate, a generation, status checks and a download. Every command here can be copied and run as is. At the end you will find the same path with the CLI and with an AI assistant through MCP.

Updated November 23, 2026

On this page
  1. What you need before you start
  2. Step 1: create an API key
  3. Step 2: pick a model
  4. Step 3: check the price for free
  5. Step 4: generate with a price cap
  6. Step 5: wait for the result
  7. Step 6: download the file
  8. The same with the CLI
  9. The same from an AI assistant
  10. Where to go next

What you need before you start

Three things: a LowCostAi account, a credit balance and an API key. A credit is the unit of payment on the site: one credit is worth $0.0299, and every generation takes a number of credits from your balance according to the model and settings. You buy credits on the credits page, with no subscription. The full explanation is on the credits and prices page.

Two terms come back throughout these docs. A job is one generation running in the background, from the moment it is sent until the file is ready. An estimate is a free check of the exact price before you generate.

Step 1: create an API key

  1. Sign in and open the developers page
  2. Give the key a name, for example after the computer or tool that will use it, and create it
  3. Copy the key right away. It starts with lca_ and is shown only once

Keep the key in an environment variable, so it stays out of your code and your command history. In a Mac or Linux terminal:

export LCA_KEY=lca_your_key_here

In Windows PowerShell:

$env:LCA_KEY = "lca_your_key_here"

Every example in these docs shows the key as $LCA_KEY. In PowerShell write $env:LCA_KEY instead, and run curl.exe rather than curl. Keys, OAuth and security are covered on the authentication page.

Step 2: pick a model

The model list is open to everyone, no key needed. The category parameter filters to video, image, audio or analysis:

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

Each model in the list comes with an id, which you send later, and from_credits, the price of one generation at its default settings. To see what a given model accepts, ask for that model:

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

In the answer, params lists every parameter: name, type, allowed values, default and whether it is required. You build your request from that. Each parameter type is explained on the jobs page.

Step 3: check the price for free

An estimate charges nothing and needs no key. Parameters are checked exactly as in a generation, so if the estimate passes, the generation will too:

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"}}'

The answer:

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

credits is the exact price. params shows every value that will be sent, defaults you did not set included.

Step 4: generate with a price cap

Send the same request to generate, with your key and with max_credits, the most you agree to pay. Put the price you got in the previous step in it:

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}'

The answer comes back at once, with status 201, and the credits have already left your balance:

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

  • If the actual price is above max_credits, the request is refused with price_above_cap and nothing is charged
  • If there are not enough credits, the request is refused with insufficient_credits and nothing is charged
  • If the generation fails later, the credits go back to your balance automatically

Step 5: wait for the result

Keep the id from the answer and read the job again and again until it finishes. This repeated check is called polling. Every 5 seconds is the right pace:

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

The same as a small bash loop that stops once the job succeeded or failed:

JOB=6f1c2e0a-1b2c-4d5e-8f90-123456789abc while true; do BODY=$(curl -s https://low-cost.ai/api/v1/jobs/$JOB -H "Authorization: Bearer $LCA_KEY") echo "$BODY" | grep -o '"status":"[a-z]*"' echo "$BODY" | grep -q '"status":"\(succeeded\|failed\)"' && break sleep 5 done echo "$BODY"

When the job is ready, status is succeeded and files holds a link for each file:

{ "id": "6f1c2e0a-1b2c-4d5e-8f90-123456789abc", "model_id": "kling-3.0", "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" }

If status is failed, error is generation_failed, refunded is true and the credits are already back. Every status and what happens between them is explained on the jobs page.

Step 6: download the file

The link in url works without a key and is valid for 30 days. The -L flag is required, because the link redirects to a download address:

curl -L -o clip.mp4 "https://low-cost.ai/f/0b6d4f2e-7a1c-4e3b-9d8f-2c5a6b7e8f90?t=<signature>&e=<day>"

The file is also saved in your library on the website. An expired link is renewed every time you read the job or the file list.

The same with the CLI

The CLI is a single file that runs on Node 18 or newer and does every step for you: it checks the price, sends it as the cap, waits and downloads. Four commands:

curl -o lowcost.mjs https://low-cost.ai/lowcost.mjs node lowcost.mjs login $LCA_KEY node lowcost.mjs estimate kling-3.0 "Tel Aviv street after rain" --duration 5 --aspect_ratio 9:16 node lowcost.mjs gen kling-3.0 "Tel Aviv street after rain" --duration 5 --aspect_ratio 9:16 --wait --out ./clips

The last command prints the job id, waits and saves the file in the clips folder. Every command and flag is on the CLI page.

The same from an AI assistant

MCP is an open standard that lets an AI assistant run outside tools during a chat. Connect the assistant to https://low-cost.ai/api/mcp, then ask in plain words. In Claude Code, for example, it is one command:

claude mcp add --transport http lowcostai https://low-cost.ai/api/mcp --header "Authorization: Bearer $LCA_KEY"

Then write: "What would a 5 second Kling 3.0 clip of a Tel Aviv street after rain cost? Show me the price and wait for my OK". The assistant checks the price, generates with a cap and brings back a link. ChatGPT, Claude on the web and Cursor connect as explained on the connect page, and the tools themselves are on the MCP page.

Where to go next