> ## Documentation Index
> Fetch the complete documentation index at: https://docs.captioncraft.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# AI integrations

> Connect CaptionCraft to tools, workflows, and agents.

## Machine-readable documentation

<CardGroup cols={2}>
  <Card title="OpenAPI 3.1" icon="braces" href="/openapi.json">Download the public endpoint contract.</Card>
  <Card title="Documentation index" icon="file-text" href="/llms.txt">Find the guides and endpoint references.</Card>
</CardGroup>

Read the [full documentation text](/llms-full.txt) for tools that ingest a single document. Use **Copy page** on an individual page for Markdown content.

## Model a long-running tool

A caption job is asynchronous. Expose at least two operations in your connector:

1. **Create captions**: call `POST /v1/subtitles` with a stable idempotency key and return the job ID.
2. **Get result**: call `GET /v1/jobs/{id}` to return status, progress, and completed output URLs.

You can also expose cancellation, preset discovery, and usage checks. Keep the API key in the connector's server-side secret store.

## Integration rules

* Check the prepaid balance and the video's expected duration before submission.
* Require a direct HTTPS media URL; an agent cannot pass a local file path.
* Save the job ID as soon as submission succeeds.
* Poll no more often than every five seconds per job and honor `Retry-After`.
* Stop on `completed`, `failed`, or `canceled`.
* Treat processing errors as tool results the caller can act on.
* Save output files before their 24-hour expiration.
* Preserve the idempotency key on network retries; create a new key only for a new job.

## Platform connectors

The REST API and OpenAPI specification can be used as the basis for a platform connector. Platform-specific manifests, authorization requirements, and submission approval still need to be implemented and verified for the target platform. This documentation does not imply a published or approved Muse connector.
