# API and MCP

> Use Songcode from an AI assistant or from your own code. Which one to pick, what each needs, and what is free.

Songcode has two doors for programs, and both reach the same account and the same songs as the app.

- **[The MCP server](https://docs.songco.de/developers/mcp/)**, at `https://studio.songco.de/mcp`, for AI assistants. Add it as a connector, sign in, and ask for songs in a conversation.
- **[The REST API](https://docs.songco.de/developers/api/)**, at `https://studio.songco.de/api/v1`, for your own code: scripts, games, bots, batch jobs, other products.

## What each call can do

Have Songcode write songs and stems: at the composition quality you pick on a plan (fast, balanced, extra or ultra compose), or on the model and reasoning level you pick on your own key. Save drafts, edit them by rule (tempo, key, mix, stems), publish them to a public link, delete them. Check ode code you already have. Export `.ode`, `.songcode` and MIDI.

Audio is the one thing neither returns. The [Songcode Audio Engine](https://docs.songco.de/audio-engine/) renders it in your browser, so every song comes back with a link that plays it, and the app [downloads](https://docs.songco.de/app/export/) WAV, MP3 and stems from there.

## Who writes, and who pays

**Songcode writes every song, on its own servers.** Your assistant or your code only asks; the writing, the checking and the fixing happen on Songcode's side, the same as in the app.

**On a plan, there is nothing to add.** Songcode writes on models tuned for ode and takes the plan's weekly usage, by how much it writes: a loop takes little, a full song more, ultra compose several times that. Once the week is used up, extra usage from the settings page carries on. Plans are not open yet while Songcode is in [early access](https://docs.songco.de/account/early-access/).

**Without a plan, bring your own key.** Songcode writes with your Anthropic or OpenAI key, as the app does, and your provider bills you. Save it once under **model key for the API and MCP** on the settings page, or send it with each API call in headers. There is no limit from Songcode on these.

Any account can connect an assistant or make an API key. Reading, editing by rule, publishing and exporting never need a plan or a key.

## Keys and connections

Assistants sign in through Songcode's own page: you see which app is asking and what it may do, and you allow it. Your own code uses an API key from **api** on the settings page; connected assistants are listed under **mcp**. Removing either ends its access at once.

![The mcp section of the settings page: an assistant that was allowed in.](https://docs.songco.de/img/settings-connections.webp)

![A new API key, shown once.](https://docs.songco.de/img/settings-new-key.webp)

## What not to build on

The app talks to its own server over routes like `/api/generate` and `/api/tracks`. Those are the app's private plumbing: unversioned, changed whenever the app needs it, and closed to anything but the app. Build on `/api/v1` and `/mcp`, which are versioned and documented here.

---

This page on the web: https://docs.songco.de/developers/
Every page of the Songcode docs, for agents: https://docs.songco.de/llms.txt (index) and https://docs.songco.de/llms-full.txt (all of it in one file).
