The MCP server
The MCP server gives AI assistants such as ChatGPT, Claude and Cursor nine tools: see models, check prices, generate, wait for results and manage files. This page describes each tool exactly. How to connect each assistant is on the connect page.
On this page
What MCP is
MCP, short for Model Context Protocol, is an open standard for connecting AI assistants to outside tools. When an assistant is connected to an MCP server it sees the server's list of tools, and runs them by itself when they help answer what you asked. Here that means you can write "make me a clip" and the assistant picks a model, checks the price, generates and brings back a link.
Address and transport
https://low-cost.ai/api/mcp
- The server uses Streamable HTTP with no session: every request stands on its own, and answers come back as JSON, not as an SSE stream
- The server name is lowcostai, version 1.0.0
- The server gives the assistant working instructions: list_models, then describe_model, then estimate, then generate with max_credits, and finally job_status until succeeded. Also: input files are https links, text longer than max_length is refused before any charge, results come back as links, and a failed generation refunds its credits
- The tools read the catalog live, so every model and every option on the website is available here too
Authentication
- API key. The Authorization: Bearer header with an lca_ key. This is how Claude Code, Cursor and any assistant that lets you set a header connect
- OAuth. An assistant that cannot send a key, such as ChatGPT, gets 401 with a pointer to sign in, you approve on a screen on our site, and it gets a key of its own. Details on the authentication page
- A website sign-in cookie is not accepted here
- Up to 120 requests a minute per account, initialize, tools/list and tools/call included
The tools
| Tool | What it does | Spends credits | Marked as |
|---|---|---|---|
| list_models | Every model and its default price | No | Read only |
| describe_model | Every parameter of a model | No | Read only |
| estimate | The exact price and your balance | No | Read only |
| generate | Starts a generation | Yes | Write action |
| job_status | Job status, links and report, with waiting | No | Read only |
| list_jobs | Recent jobs | No | Read only |
| list_files | Library files and storage | No | Read only |
| delete_file | Deletes a file for good | No | Destructive |
| balance | Balance, storage and a top-up link | No | Read only |
The marking is sent to the assistant with the tool. Assistants such as ChatGPT ask for your confirmation before a tool that is not marked read only, that is before generate and delete_file.
list_models
| Name | Type | Required | Meaning |
|---|---|---|---|
| category | video, image, audio or analysis | No | Filter by category |
Returns { models: [{ id, name, category, modes, from_credits }] }. Fewer fields than REST: no params, price_basis or guide. For the full details call describe_model.
describe_model
| Name | Type | Required | Meaning |
|---|---|---|---|
| model | string | Yes | The model id |
Returns exactly what GET /api/v1/models/{id} returns: every parameter with type, values, default, range, max_length and label. An unknown model returns not_found.
estimate
| Name | Type | Required | Meaning |
|---|---|---|---|
| model | string | Yes | The model id |
| params | object | No | The model parameters |
Returns { model, credits, params, balance }: the exact price, the normalized parameters and your balance. No variants.
generate
| Name | Type | Required | Meaning |
|---|---|---|---|
| model | string | Yes | The model id |
| params | object | No | The model parameters |
| max_credits | number, above 0 | Yes | The cap. Send the price from estimate |
Returns the job, with source: mcp. Spends credits. The same errors as REST: price_above_cap with credits, insufficient_credits with topup, invalid_params, not_found, storage_payment_required and rate_limited, under a limit of 30 generations a minute shared with the API. The tool is not idempotent: calling it again creates another job.
job_status
| Name | Type | Required | Meaning |
|---|---|---|---|
| job_id | string | Yes | The job id from generate |
| wait_seconds | number, 0 to 25 | No | How many seconds to wait for the end. Default 0, an immediate answer |
Returns the job with a link for each file. The tool checks every 3 seconds until the job finishes or the time runs out, and each check also moves the job forward. A succeeded analysis job also carries report, preceded by a plain text summary of the report in the report language.
list_jobs
| Name | Type | Required | Meaning |
|---|---|---|---|
| limit | integer, 1 to 100 | No | How many jobs. Default 20 |
Returns { jobs } with file links, newest first, and moves open jobs forward on the way. No paging.
list_files
| Name | Type | Required | Meaning |
|---|---|---|---|
| limit | integer, 1 to 200 | No | How many files. Default 50 |
Returns { files, storage } in the same shape as GET /api/v1/files. No paging.
delete_file
| Name | Type | Required | Meaning |
|---|---|---|---|
| file_id | string | Yes | The file id |
Deletes for good and returns { ok: true }. Cannot be undone.
balance
No input. Returns { credits, storage, topup }: the balance, storage use and a link to the credits page.
Recommended flow
- list_models to pick a model, with category if you know what you want
- describe_model to learn which parameters and values are allowed
- estimate to get the exact price for free, and show it to you for approval
- generate with max_credits equal to the price from estimate
- job_status with wait_seconds: 25, again and again until succeeded or failed
- Bring back the links from files
Results and errors
Every successful result comes back twice: as JSON text inside content, and as an object in structuredContent. An error comes back with isError: true and JSON text such as { "error": "price_above_cap", "credits": 12.5 }. Arguments that do not fit the tool definition return plain text starting with MCP error -32602. Details on the errors page.
What MCP does not do
File uploads, credit history, key management, account updates, estimates with variants and paging through lists. For an input file: upload through the API, the CLI or the library on the website, and give the assistant the link.