canonical: https://jentic.com/apis/martini.film/martini

# Martini Film Martini API

The Martini API submits image, video, and audio generations to the models your key can invoke and runs saved Martini workflows on a project canvas. Generations and workflow runs are asynchronous: you submit, then poll the status route until it reports completed, failed, or cancelled, since the API sends no webhooks. An idempotencyKey on generations and runs returns the same object on a retry instead of charging twice, and prices are quoted in olives, Martini's credit unit. Direct and base64 asset uploads feed source files into projects, and a tool manifest exposes the same tools Martini offers to agents.

## For AI agents

Submit AI media generations, run saved Martini workflows, upload source assets into projects, and poll each job until it finishes. Prices are in olives and idempotency keys prevent double charges on retries.

## Scope

Does not handle video editing timelines, hosting or streaming finished video, or webhook notifications. Use for submitting Martini generations and workflow runs and collecting their outputs only.

## Capabilities

- Submit a generation to a model endpoint returned by the model list, or save it as an uncharged draft with mode set to draft and start it later
- Place a copy of a saved workflow into a project and start a run with variables, bins, and an oliveBudget cap
- Poll a generation or run until it reaches completed, failed, or cancelled, using the wait parameter on run status to long-poll
- Resume a failed workflow run and fetch its outputs once it finishes
- Upload source files into a project through prepared direct uploads or a single base64 upload, then check each asset's status
- Find a project by name with the query and exactName filters before targeting it with a generation or run
- Invoke a named tool from the Martini tool manifest and keep only selected fields of its result with the select parameter

## Use cases

### Agent-run media generation through Jentic

A coding or production agent can drive Martini end to end through Jentic: it lists the model endpoints the key may use, submits a generation with an idempotencyKey so a retried call never charges twice, and polls the generation until its status is terminal. Because Martini has no webhooks, the submit-then-poll loop is the whole integration, and the agent only needs the generation id to finish it.

Example prompt: Call the model list, pick an image-to-video endpoint, submit a generation to it with an idempotencyKey of trailer-shot-01 in project Launch Trailer, then poll the generation every few seconds until its status is completed and return the output

### Repeatable workflow runs for a production pipeline

Teams that have built a multi-step Martini workflow can rerun it from code with fresh inputs. Starting a run on a saved workflow uses its saved definition and presets on a fresh canvas, variables are pinned by name, bins can be filled with public https URLs that Martini imports before the run starts, and an oliveBudget caps the credit spend. If a step fails, the run can be resumed rather than restarted.

Example prompt: Start a run of workflow wf_123 with the variable product_name set to Aurora and an oliveBudget of 500, poll its compact status with wait enabled until it is terminal, resume it once if it failed, then fetch the run results

### Feeding source assets into a project

Generations and workflow runs often need reference images, footage, or audio. The Martini API offers a two-step direct upload (prepare, push the bytes, then complete) for larger files and a single base64 upload for small ones, each optionally placed on a canvas. The asset status route confirms a file is ready before it is used as an input.

Example prompt: Upload logo.png as base64 with contentType image/png into project Launch Trailer, then read the asset status and confirm it is ready before submitting a generation that uses it

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/models` | List model endpoints the key can invoke |
| POST | `/v1/generations` | Submit a generation or draft |
| GET | `/v1/generations/{id}` | Generation status and output |
| POST | `/v1/workflows/{workflowId}/runs` | Start a workflow run |
| GET | `/v1/runs/{runId}/status` | Compact run status |
| GET | `/v1/runs/{runId}/results` | Run outputs |
| POST | `/assets/uploads/base64` | Upload one small file |

## Key resources

- **Generations** — Submit, draft, start, cancel, and poll single model generations.
- **Models** — List the endpoint aliases the key can submit to, with billable unit and negotiated pricing.
- **Workflows and runs** — List and place saved workflows, start runs, poll status, resume failures, and fetch results.
- **Projects and canvases** — Find projects by name and list each project's canvases for placement.
- **Assets** — Prepare and complete direct uploads, upload small files as base64, and check asset status.
- **Tools** — Read the tool manifest and invoke a named tool with its arguments.

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 65 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 85 / 100
  - Developer Experience & Jentic Compatibility: 68 / 100
  - AI-Readiness & Agent Experience: 46 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 72 / 100
- **View full report:** https://jentic.com/apis/martini.film/martini/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Martini by hand means handling its bearer key, an asynchronous submit-then-poll loop with no webhooks, idempotency keys for safe retries, and Retry-After backoff. Through Jentic you install once, import the Martini API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Martini puts the workflow id, run id, and project id in the URL path (`/v1/workflows/{workflowId}/runs`, `/v1/runs/{runId}`), so a rule can pin your agent to one workflow and the operations you pick. You choose the operations it may call, so spending ones like submitting new generations or invoking tools are not included unless you add them.
- **Credential handling:** Your Martini key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a video clip' or 'run a saved workflow', and Jentic returns the matching Martini operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Runway ML API** — Runway generates video from text and images with its own models; Martini routes generations across many model endpoints and adds saved workflows.
- **fal.ai** — fal.ai hosts generative media models behind a queue API, without Martini's projects, canvases, and workflows.
- **ElevenLabs** — ElevenLabs produces voiceover and speech audio that can be uploaded into a Martini project as an asset.
- **Shotstack** — Shotstack renders and edits finished video timelines from generated clips.

## FAQ

### What authentication does the Martini API use?

The Martini API authenticates with a bearer token per its OpenAPI spec: send your Martini key as Authorization: Bearer followed by the key, and the Key form is accepted too. Keys are created under Settings in Martini and are server-side secrets. The CLI login pairing routes and the spec document route are open and need no key. Through Jentic the key is stored encrypted on your own instance and injected at call time.

### Is there a Martini MCP server?

You don't need an MCP server to give your agent Martini. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it. Operations are discovered on demand, so your agent's context is not filled with another server's tool definitions.

### Can I limit what my agent is allowed to do with the Martini API?

Yes. For example, write a rule that allows only starting runs, reading run status, and reading run results under `/v1/workflows/wf_123` and `/v1/runs`, so the agent can rerun that one workflow and collect its outputs but cannot submit ad hoc generations or upload assets. Every call it makes is logged.

### How do I know when a Martini generation is finished?

Poll it. The Martini API sends no webhooks, so after submitting a generation you call GET `/v1/generations/{id}` until the status is completed, failed, or cancelled. Workflow runs work the same way through the run status routes, and the compact status route accepts a wait parameter so each poll can hold until something changes.

### What are the rate limits for the Martini API?

The OpenAPI spec does not publish numeric rate limits. It says to retry only rate-limited and server-error responses, waiting for the Retry-After header, and rate-limited answers carry the stable RATE_LIMITED code. Check https://www.martini.film/docs/api for current limits.

### How do I run a saved Martini workflow through Jentic?

Search Jentic for an intent like 'run a Martini workflow', import the Martini API, and store your key once. Your agent then lists workflows, calls POST `/v1/workflows/{workflowId}/runs` with its variables and an idempotencyKey, polls the run, and fetches the results. To run it on your own infrastructure, install Jentic One from its GitHub repo.
