Developers · AI agents

Let an agent turn your data into a chart video.

Everything you can do in the Chartapir web app, an AI agent can do for you: price a video, send a table, wait for the render and download the MP4. It works on your account, with your credits and within limits you set.

What an agent can do

  • Read the account: plan, available credits, whether videos carry a watermark, and the longest duration the plan allows a video to ask for.
  • List the durations, aspect ratios (16:9 and 9:16), themes, narration languages and voices the plan allows.
  • Price a video in credits before making it. Pricing writes nothing and costs nothing.
  • Make a video from a table sent inline (CSV text or rows of JSON, up to 2 MB) or from an uploaded .csv or .xlsx file up to 25 MB.
  • State requirements as fields: which columns, rows or period to use, what the video must show or answer, and key numbers with the cell or formula each comes from. The service checks them against the data and reports back line by line.
  • Hold a video for approval once its story is written, before any narration is made, then approve it or revise it.
  • Check progress, read the compliance report, cancel, retry a failed video, and download the finished MP4.

An agent cannot buy credits, change your plan, create or revoke API keys, edit a finished video, or write the storyboard itself. Those stay with you.

Three ways in

MCP server

For Claude and other AI assistants. You sign in and approve once; no key to copy.

Connect an assistant

REST API

For your own code or agent. JSON over HTTPS with an API key from your account.

Read the reference

Command line Coming soon

A chartapir CLI, with a skill file that teaches a coding agent how to use it. Not released yet.

About the CLI

Each one reaches the same service: the same account, the same credits, the same checks and the same error codes.

Connect with MCP

Chartapir runs a remote MCP server at https://chartapir.app/mcp. When an assistant connects, it sends you to a Chartapir page where you sign in and choose Allow. The assistant then acts on your account through a token of its own; it never sees your password and needs no API key.

Claude on the web and Claude Desktop

  1. In Claude, open Settings → Connectors and choose Add custom connector.
  2. Name it Chartapir and paste https://chartapir.app/mcp as the URL.
  3. Choose Connect. Sign in to Chartapir if asked, read what the assistant will be able to do, and choose Allow.
  4. In a chat, turn the Chartapir connector on and ask for a video from your table.

On a Claude Team or Enterprise plan, an owner may need to add the connector first.

Claude Code

  1. Add the server:
claude mcp add --transport http chartapir https://chartapir.app/mcp
  1. In Claude Code, run /mcp, pick chartapir and authenticate. Your browser opens the Chartapir approval page.

Other MCP clients

A client can connect if it supports remote MCP servers over Streamable HTTP with OAuth and calls from a server, a desktop app or a command line. A request that carries a browser Origin header other than chartapir.app is refused with 403, so a client running in a web page cannot connect directly. The server publishes its OAuth metadata at /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server. It supports the authorization code flow with PKCE (S256), refresh tokens, and dynamic client registration. The scopes are account, videos:read and videos:create.

The twelve tools

ToolWhat it does
chartapir_accountPlan, available credits, watermark and the longest duration the plan allows.
chartapir_optionsDurations, aspect ratios, themes, languages and voices this account may use, and the defaults.
chartapir_estimate_videoPrices a video in credits. Writes nothing.
chartapir_request_uploadReserves an upload for a .csv or .xlsx file up to 25 MB and returns a signed URL.
chartapir_create_videoStarts a video from an inline table or an upload. Reserves credits.
chartapir_get_videoStatus, progress, compliance report and cost of one video.
chartapir_list_videosThe account’s videos, newest first, a page at a time.
chartapir_confirm_videoApproves a video held for preview, so it goes on to narration and render.
chartapir_revise_videoRe-writes a held video’s story with new requirements or a new note.
chartapir_download_videoA signed link to the finished MP4, valid for five minutes.
chartapir_cancel_videoStops a video that has not finished. Nothing is charged.
chartapir_retry_videoRestarts a failed video whose retryable flag is true.

Each tool calls the REST API with the assistant’s own token, so the same checks, limits and error codes apply. Two tools differ from the routes: for a video held for preview, chartapir_get_video also fetches the preview and returns it inside the video, and chartapir_revise_video removes requirements with clearRequirements: true (an empty requirements object is ignored), where the REST route takes "requirements": {}.

Staying in control

Every connected assistant is listed in Account → Connected apps. There you can set a lower daily video limit for it, or disconnect it. A disconnect takes effect on its next call.

API keys

Your own code and scripts use an API key. Make one in Account → API keys. Production keys start with cpk_live_. The key is shown once, when it is made; copy it then. Send it as Authorization: Bearer cpk_live_….

AccessWhat a key with it can do
Make videosRead your account, make videos with your credits, and download them.
Read onlyRead your account and your videos, but not spend credits.
  • Videos per day (optional, 1 to 500): a lower daily limit than your plan’s for this key. Leave it empty to follow the plan.
  • Credits per month (optional): the most this key may reserve in a billing period.
  • An account can hold up to 5 keys at a time.
  • Limits are fixed once a key is made. To change one, revoke the key and make another. A revoked key is refused on its next call.

The command line (coming soon)

A chartapir command-line tool is on the way. It will wrap the REST API, print one JSON document per command so an agent can read the result, and ship a SKILL.md that tells a coding agent when and how to use Chartapir.

The CLI is not released yet. Until it is, connect an assistant over MCP or call the REST API with an API key.

Limits

Each API key and each connected assistant has a daily video limit that follows your plan. You can set a lower one for any key or assistant, never a higher one.

PlanLongest duration you can ask forVideos a day, per key or assistant
Free30 secondsNo separate limit; the Free plan’s 3 videos a day apply to the whole account
Starter60 seconds10
Pro2 minutes50
Premium5 minutesNo daily limit

The duration is what you request. The finished video follows the data and can run up to twice that long; see how credits are charged below.

  • The daily limit is a rolling 24 hours, and counts every video started and every retry.
  • Each key or assistant has a budget of 60 calls to the service that refills continuously at 60 a minute. Making a video takes several of them.
  • Your account’s own limits still apply on top: available credits, videos in progress at once, and on Free the daily video limit.
  • On a plan with a daily video limit, a preview whose story was shown and that is then cancelled, left to expire, or revised into a failure counts as one of the day’s videos.

Plan prices and credits are on the plans page.

How credits are charged

  1. Price it first. An estimate is free and returns two prices. units is the price at the length you asked for; a video that runs longer, up to twice that length, is not charged for the extra. maxUnits is the most the video can cost when it is charged for its real length, which the data decides and which can run up to twice the length you asked for.
  2. Choose the rule when you create. Without acceptedUnits, the video reserves units. With acceptedUnits set to the maxUnits you were shown, the video is charged for its real length, never above that number; if the price has risen since the estimate, the create is refused and nothing is reserved.
  3. Credits are reserved when the video starts. The reservation is the most it can cost.
  4. It is charged when it completes, for what it delivered, never more than the reservation. The video reports reservedUnits, settledUnits (what was charged) and durationSeconds (its real length).
  5. Failed and cancelled videos are not charged. A video held for preview keeps its reservation and is charged only if you approve it and it completes; one left unapproved cancels itself after an hour.

Next

The API reference lists every route with its fields, an example, and every error code. For what happens to your data on the way, see how Chartapir works and security.