Skip to content
Menu · Quickstart

Get started

Quickstart

Create an account, publish a template, make an API key and print your first PDF with Composa.

This guide takes you from nothing to a printed PDF. It takes a few minutes.

1. Create an account

Sign up with your email. Your account comes with a Team, and the Free plan to start. See Pricing for what each plan includes.

2. Create a template

A template is the design Composa prints again for each call. Make one in either of two ways:

  • By hand. Open the app and create a template. Draw the page in the editor. To make a text change per document, turn it into a variable: full_name, total, due_date.
  • With an agent. Connect an agent over MCP and describe the document. The agent builds it in your Team while you watch.

3. Publish it

Press Publish in the editor. The API prints the published version of a template, never the draft you are editing. Publish again whenever you want a change to reach the API.

Copy the template's id from the app. It looks like 85416813-8d99-46e8-be2b-1d61cee5db38.

4. Make an API key

An Admin of your Team makes keys on the API keys page of the app. Pick Full access to reach every template of the Team, or Template access to reach only the templates you list.

The key starts with cmp_live_ and is shown once. Keep it with your other secrets, on a server, never in a browser:

bash
export COMPOSA_API_KEY="cmp_live_..."

5. Print your first PDF

Send the template id and your data. The answer is the PDF itself.

curl -X POST https://api.composa.ai/v1/run \  -H "Authorization: Bearer $COMPOSA_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "template_id": "85416813-8d99-46e8-be2b-1d61cee5db38",    "data": { "full_name": "Ada Lovelace", "course": "Engineering" }  }' \  --output document.pdf

Open the PDF. With cURL it is document.pdf. The SDKs save it under the file name the API gives, the template's title, and fall back to document.pdf. Each key in data fills the variable of the same name. To print a PNG instead, add "format": "png".

6. Read the template's fields

Not sure what a template expects? Ask it. The answer lists each field, its kind, and what happens when a call sends no usable value for it.

curl "https://api.composa.ai/v1/contract?template_id=85416813-8d99-46e8-be2b-1d61cee5db38" \  -H "Authorization: Bearer $COMPOSA_API_KEY"

Next steps