Skip to content

MCP tools reference

Every tool and ready-made workflow of the Lykia MCP server, with its inputs, its output, the scope it needs and whether it spends credits.

Markdown
On this page

The Lykia MCP server at https://api.getlykia.com/mcp offers the tools below. How to connect a client is covered in MCP: connect Lykia to your AI client. Each tool runs in the project the connection belongs to.

ToolScopeSpends credits
models_listmodels:readNo
model_getmodels:readNo
cost_estimatemodels:readNo
chatchatYes
credits_getusage:readNo
usage_summaryusage:readNo
generation_getusage:readNo
image_generateimagesYes
video_generatevideosYes
video_statusvideosNo
video_waitvideosNo
speech_generatespeechYes
voices_listspeechNo
workflows_listnoneNo
workflow_getnoneNo

Every tool returns structured content that matches its output schema, plus a short text summary for the model to read. Tools are listed to a client only when the connection has the scope they need; calling a tool without its scope is refused with HTTP 403 and insufficient_scope. Connections made with a project API key have every scope.

Errors

A tool that fails returns isError: true and an error object in its structured content:

errorobject
messagestring

What went wrong and what to do next, in English.

codestring

A stable code, for example invalid_request, model_not_found, max_cost_exceeded, cost_unknown, rate_limited, insufficient_credits or limit_exceeded.

statusnumber | null

The HTTP status of the underlying gateway error, when there is one.

reasonstring

The error class, as in Errors.

models_list

Lists the models this project can call, with context length, modalities and prices in USD per million tokens. The list is the same as GET /models for the project.

searchstring

Text matched against the model id and name, for example claude or gpt-4o.

output_modalitystring

Only models that produce this: text, image, audio, video, file. Use text for chat models.

input_modalitystring

Only models that accept this input, for example image for vision models.

supportsstring

Only models that support this request parameter, for example tools or response_format.

max_pricenumber

Only models whose input price is at most this many USD per million tokens.

free_onlyboolean

Only free models.

sortstring

name (default), price (cheapest input price first) or newest.

limitinteger

The most models to return, from 1 to 200. Defaults to 50.

Output: total (models that match), returned, and models[] with id, name, context_length, input_modalities, output_modalities, pricing_usd_per_million_tokens { prompt, completion } and is_free.

model_get

Returns one model's full details: description, context length, maximum output tokens, modalities, supported parameters and exact prices.

modelstringrequired

A model id such as openai/gpt-4o-mini.

Output: model, the full model object as in GET /models, plus pricing_usd_per_million_tokens.

cost_estimate

Estimates the highest possible cost of a chat call before it runs. Prompt tokens are estimated from the text (about four characters per token) and the whole max_tokens output is assumed, so the real cost is usually lower. Nothing is spent.

modelstring

A model id. Defaults to the project's default model.

promptstring

The user prompt. Give this or messages.

messagesarray

The full conversation: objects with role (system, developer, user or assistant) and content (text or content parts).

systemstring

An optional system instruction.

max_tokensinteger

The output limit you will ask for. Defaults to 1024.

Arguments
{
  "model": "openai/gpt-4o-mini",
  "prompt": "Write three subject lines for our spring newsletter.",
  "max_tokens": 256
}

Output: model, estimated_max_cost_usd, currency (USD) and estimates[] (one per model considered).

chat

Runs a text model once (not streamed) and returns the answer. Spends credits of the connected project, under the same rules as POST /chat/completions: the company balance, the project budget, the connection's monthly limit and the rate limit all apply, and the request appears in the project's request logs with the app's name.

modelstring

A model id such as openai/gpt-4o-mini. Defaults to the project's default model.

promptstring

The user prompt. Give this or messages.

messagesarray

The full conversation instead of prompt, as in cost_estimate. Content parts follow the Chat Completions format.

systemstring

An optional system instruction.

max_tokensinteger

The output limit. Defaults to 1024.

temperaturenumber

Sampling temperature, from 0 to 2.

max_cost_usdnumber

Refuse to run, without charging anything, when the highest possible cost is above this many USD (error max_cost_exceeded).

metadataobject

String tags stored with the request record and never sent to the provider.

Arguments
{
  "model": "openai/gpt-4o-mini",
  "prompt": "Write three subject lines for our spring newsletter.",
  "max_tokens": 256,
  "max_cost_usd": 0.01,
  "metadata": { "team": "marketing" }
}

Output:

idstring

The request id; pass it to generation_get.

modelstring

The model that answered.

providerstring | null

The provider that answered.

contentstring

The answer text.

finish_reasonstring | null

length means the answer stopped at max_tokens.

usageobject

prompt_tokens, completion_tokens and total_tokens.

cost_usdnumber

What the request cost.

latency_msnumber

How long the call took.

max_tokens_appliednumber | null

The output limit Lykia applied, when it set or lowered it.

Good practice, which the tool description also tells the model: run cost_estimate with the same input, show the estimate, wait for your go-ahead, then call chat with max_cost_usd slightly above the estimate.

credits_get

Shows the company's prepaid balance, what is available for new requests, and this connection's own spending limit and usage.

No inputs.

Output: company { id, name }, project { id, name }, credits (as in GET /credits) and connection with label, limit, limit_reset, usage, limit_remaining and, for apps connected through OAuth, scopes.

usage_summary

Summarises the project's usage between two UTC dates: requests, errors, tokens and cost in USD, grouped by model, by day or by key and connection.

fromstring

First day, YYYY-MM-DD (UTC). Defaults to 30 days ago.

tostring

Last day, inclusive, YYYY-MM-DD (UTC). Defaults to today.

group_bystring

model (default), day or key.

limitinteger

The most rows to return. Defaults to 50.

Arguments
{
  "from": "2026-11-01",
  "to": "2026-11-23",
  "group_by": "model",
  "limit": 10
}

Output: from, to, group_by, totals { requests, errors, prompt_tokens, completion_tokens, cost_usd, list_cost_usd } and rows[] with the same figures per group. With group_by: "key", each row says whether it is an API key or a connected app and whether it is this connection.

generation_get

Fetches one request record by its id (the id that chat returns): model, provider, tokens, real cost, latency, status and fallback attempts. Prompt and answer text are never returned. A record appears a moment after the request finishes.

idstringrequired

The request id, for example gen-1732350000-AbCdEf0123456789.

Output: generation, the same object as GET /generation returns.

image_generate

Generates or edits images with an image model through POST /images/generations. Spends credits under the same rules as chat.

modelstring

An image model id or preset. Defaults to @image.

promptstringrequired

What to draw, or how to change the source images.

ninteger

How many images, 1 to 4. Defaults to 1.

size

, aspect_ratio, resolution, quality, seed, output_format — As the model allows; see its media.capabilities with model_get.

imagesstring[]

Up to 8 source images for editing or as references: https:// URLs or data: URIs.

provider_optionsobject

Provider-specific options from the model's allow-list.

max_cost_usdnumber

Refuse to run, without charging anything, when the highest possible cost is above this many USD.

metadataobject

String tags stored with the request record.

Arguments
{
  "model": "@image",
  "prompt": "A flat illustration of a lighthouse at dusk, warm colours",
  "aspect_ratio": "16:9",
  "n": 1,
  "max_cost_usd": 0.1,
  "metadata": { "team": "marketing" }
}

Output: id, model, provider, cost_usd and images[] with url (a one-hour link to the original file, or null when Lykia's storage is not available), expires_at, mime_type, width, height and preview. The tool also returns a small preview of up to four images (at most 1024 px on the long side) for the client to show; the original file is never re-encoded.

video_generate

Starts a video job through POST /videos and returns at once. Spends credits when the job completes; a failed, cancelled or timed-out job is free unless the provider charged for a rejection.

modelstring

A video model id or preset. Defaults to @video.

promptstringrequired

What should happen in the video.

image

, last_frame (string) — A first and last frame: https:// URLs or data: URIs.

reference_imagesstring[]

Reference images, as the model allows.

duration

, aspect_ratio, resolution, audio, seed, provider_options — As in POST /videos.

max_cost_usdnumber

Refuse to start, without charging anything, when the highest possible cost is above this many USD.

metadataobject

String tags stored with the request record.

Arguments
{
  "model": "@video",
  "prompt": "Slow camera push towards a lighthouse at dusk, waves below",
  "duration": 5,
  "aspect_ratio": "16:9",
  "max_cost_usd": 1
}

Output: the job object with id, status (queued), model and provider. Follow it with video_wait or video_status.

video_status

Reads a video job once through GET /videos/{id}.

idstringrequired

The job id from video_generate.

Output: the job object. Once completed it carries a one-hour link to the file and the real cost.

video_wait

Waits for a video job, checking it every few seconds, and reports progress to clients that ask for it.

idstringrequired

The job id.

timeout_secondsinteger

How long to wait, up to 300. Defaults to 300.

Output: the job object plus done (whether the job ended) and waited_seconds. When done is false the job is still running; call video_wait again.

speech_generate

Turns text into speech through POST /audio/speech. Spends credits under the same rules as chat.

modelstring

A speech model id or preset. Defaults to @tts.

inputstringrequired

The text to speak, up to 10,000 characters.

voicestringrequired

A voice id from voices_list.

response_format

, speed, language, instructions — As in POST /audio/speech.

max_cost_usdnumber

Refuse to run, without charging anything, when the cost is above this many USD.

metadataobject

String tags stored with the request record.

Arguments
{
  "model": "@tts",
  "input": "Welcome to the spring collection.",
  "voice": "JBFqnCBsd6RMkjVDRZzb",
  "response_format": "mp3",
  "max_cost_usd": 0.05
}

Output: id, model, cost_usd, url and expires_at (a one-hour link to the audio when Lykia's storage is available; otherwise the audio is returned inline when it is small enough), mime_type and bytes.

voices_list

Lists the voices of a speech model through GET /audio/voices: the provider's ready-made voices and the project's clones.

modelstring

A speech model id or preset. Defaults to @tts.

Output: model and voices[] with id, name and the other voice fields.

When max_cost_usd is given and no price is known for the chosen options, a spending tool does not run and returns cost_unknown. With only your own provider keys for the model, the estimate is 0 because Lykia credits are not spent.

workflows_list

Lists the ready-made workflows available on this connection. A workflow is a recipe for the model: what to ask you, which tools to call in which order, and that it must show a cost estimate and wait for your go-ahead before spending.

languagestring

en (default) or tr.

Output: workflows[] with name, title, description and arguments[].

workflow_get

Returns the full instructions of one workflow.

namestringrequired

The workflow name, for example model-compare.

argumentsobject

Inputs you already gave, keyed by argument name.

languagestring

en (default) or tr.

Output: name, title and instructions.

Ready-made workflows

Clients that support MCP prompts show these as commands (for example as slash commands); other clients reach them through workflows_list and workflow_get. Both give the same text.

WorkflowWhat it doesNeeds
model-compareRuns the same prompt on two to four text models with identical settings and compares answer quality, latency and real cost.models:read, chat
cost-reportSummarises the project's spending by model and by day, checks the balance and suggests concrete ways to save.usage:read, models:read
product-adTurns a product photo into ready-to-run ad images with a headline and a call to action.models:read, images, usage:read
ad-variantsProduces several versions of one ad that differ only in headline or hook, ready for A/B testing.models:read, images, usage:read
ad-resizeRecomposes one ad for feed, story, banner and other placement sizes without cropping away the product or text.models:read, images, usage:read
ad-localizeAdapts an ad's copy and visuals to other languages and markets, keeping the layout and brand intact.models:read, images, usage:read
logo-conceptsExplores several distinct logo directions for a brand, as simple marks that work at small sizes.models:read, images, usage:read
social-packTurns one idea into a matching set of posts for several platforms, with images, captions and alt text.models:read, images, usage:read
storyboardBreaks a script into shots and draws each one as a consistent storyboard frame.models:read, images, usage:read
product-videoCreates a short showcase video of a product, starting from its photo and a planned camera move.models:read, images, videos, usage:read
ugc-videoMakes a short, vertical, creator-style video with a fast hook and a spoken line about a product.models:read, videos, speech, usage:read
explainer-videoPlans, narrates and generates the scenes of a short explainer video on a topic, product or process.models:read, speech, videos, usage:read
voiceoverTurns a script into a clean voiceover file with a chosen voice, pace and format.models:read, speech, usage:read

A workflow is listed only when the connection has the scopes its steps need. Every workflow that spends asks for a cost estimate and your go-ahead first.