canonical: https://jentic.com/apis/lumenfall.ai/lumenfall

# Lumenfall Engine API

The Lumenfall Engine API runs image, video, and chat models from many providers behind one set of OpenAI-compatible endpoints. It generates and edits images, starts asynchronous video generation jobs that are polled by job ID, and serves chat completions with optional streaming, while native endpoints report the account balance and list recent requests. A dryRun flag on image requests returns an estimated cost without running the model, and Record and Replay headers can replay a recorded response instead of calling the model, which helps when testing an integration.

## For AI agents

Generate and edit images, create video generation jobs, and run chat completions across models through OpenAI-compatible Lumenfall endpoints, with cost estimates via dryRun and balance checks. Authenticates with an lmnfl_ bearer key.

## Scope

Does not host or fine-tune custom models, store a media library, or transcode existing video. Use for generating and editing images, generating video, and chat completions through Lumenfall only.

## Capabilities

- Generate images from a prompt with a chosen model, size, quality, and response_format of url or b64_json via POST `/openai/v1/images/generations`
- Edit an uploaded image with a prompt and optional mask through POST `/openai/v1/images/edits`
- Start an asynchronous video generation job with prompt, duration_seconds, and size, then poll GET `/openai/v1/videos/{id}`
- Run OpenAI-compatible chat completions with stream, temperature, and max_tokens via POST `/openai/v1/chat/completions`
- Estimate the cost of an image request without running the model by setting dryRun to true
- Replay recorded responses during testing with the X-Lumenfall-Replay headers instead of paying for a fresh generation
- Check the account balance and list recent requests filtered by key_id or time window

## Use cases

### Creative agent through Jentic

A content agent produces visuals on request without the developer wiring each model provider. It searches Jentic for 'generate an image', receives POST `/openai/v1/images/generations` with its model, prompt, size, and response_format fields, picks a model from GET `/openai/v1/models`, and returns the image URL. A dryRun call first lets it report the estimated cost before spending.

Example prompt: Call GET `/openai/v1/models`, choose an image model, call POST `/openai/v1/images/generations` with dryRun true to get the estimated cost, then run it with prompt 'ceramic mug on a wooden table, soft light' and size 1024x1024

### Asynchronous video generation

Video takes longer than an HTTP request, so Lumenfall runs it as a job. POST `/openai/v1/videos` returns 202 with a job ID for a prompt, duration_seconds, and size, and the agent polls GET `/openai/v1/videos/{id}` until the job finishes, then hands back the result.

Example prompt: Call POST `/openai/v1/videos` with a chosen model, prompt 'drone shot over a foggy forest at sunrise', and duration_seconds 5, then poll GET `/openai/v1/videos/{id}` until the job completes

### Deterministic integration tests with Record and Replay

Testing an image pipeline against live models is slow and costs money on every run. Setting X-Lumenfall-Replay on generation requests lets Lumenfall return a recorded response, with X-Lumenfall-Replay-Match choosing how recordings are matched and X-Lumenfall-Replay-Latency set to instant or real to simulate timing.

Example prompt: Call POST `/openai/v1/images/generations` with the X-Lumenfall-Replay header set to a replay-or mode and X-Lumenfall-Replay-Latency instant, and confirm the response comes from a recording

### Spend monitoring

Keep an eye on usage across keys. GET `/v1/balance` returns the account balance, and GET `/v1/requests` lists recent requests with limit, created_after, created_before, and key_id filters, so a developer can see which key spent what over a window.

Example prompt: Call GET `/v1/balance`, then GET `/v1/requests` with created_after set to the start of the week and key_id for the production key, and summarise the requests

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/openai/v1/images/generations` | Generate images |
| POST | `/openai/v1/images/edits` | Edit images |
| POST | `/openai/v1/videos` | Create a video generation job |
| GET | `/openai/v1/videos/{id}` | Get video job status |
| POST | `/openai/v1/chat/completions` | Chat completions |
| GET | `/openai/v1/models` | List models |
| GET | `/v1/balance` | Get account balance |

## Key resources

- **Images** — OpenAI-compatible image generation and editing with cost estimates
- **Videos** — Asynchronous video generation jobs polled by ID
- **Chat completions** — OpenAI-compatible chat with optional streaming
- **Models** — Available models and their details
- **Account** — Balance and recent request history

## 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:** 47 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 22 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 63 / 100
- **View full report:** https://jentic.com/apis/lumenfall.ai/lumenfall/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 Lumenfall by hand means handling its lmnfl_ bearer key, multipart uploads for image edits, polling asynchronous video jobs, and the Record and Replay headers. Through Jentic you install once, import Lumenfall from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Rules filter by method and path, so you can bound the agent to the operations it needs, such as image generation and model listing. Video job status reads carry the job id in the path (`/openai/v1/videos/{id}`), so a rule can pin polling to one job. Spending operations like video generation are not included unless you add them.
- **Credential handling:** Your Lumenfall API 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 an image' or 'create a video from a prompt', and Jentic returns the matching Lumenfall operation with its input schema, including model, prompt, and size, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenAI API** — OpenAI's own image, chat, and audio models
- **fal API** — Hosted generative media models for images, video, and audio
- **Replicate API** — Run open-source models, including image and video, via predictions
- **OpenRouter API** — One endpoint routing chat completions across many language models

## FAQ

### What authentication does the Lumenfall Engine API use?

Per its OpenAPI spec, the Lumenfall Engine API uses an HTTP bearer token in the form lmnfl_<key_id>.<secret>, sent in the Authorization header. Through Jentic, the key is stored encrypted by your own Jentic One instance and injected at execution time.

### Is the Lumenfall Engine API compatible with OpenAI clients?

Yes. Image generation, image edits, videos, models, and chat completions sit under the `/openai/v1` prefix and follow OpenAI-compatible request shapes, such as model and prompt for images and model and messages for chat. Account endpoints like GET `/v1/balance` and GET `/v1/requests` are Lumenfall-native.

### Can I see what an image generation will cost before running it?

Yes. Set the dryRun query parameter to true on POST `/openai/v1/images/generations` or POST `/openai/v1/images/edits` and Lumenfall returns an estimated cost without running the model.

### What are the rate limits for the Lumenfall Engine API?

The OpenAPI spec does not specify rate limits. Check https://docs.lumenfall.ai for current limits.

### How do I generate an image with Lumenfall through Jentic?

Install Jentic One, add the Lumenfall Engine API from the Jentic directory, and store your lmnfl_ key. Your agent searches for 'generate an image', receives POST `/openai/v1/images/generations` with its input schema, and sends model and prompt. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Lumenfall MCP server?

You don't need an MCP server to give your agent Lumenfall. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the image, video, and chat operations by intent.

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

Yes. A rule allowing only POST `/openai/v1/images/generations` and GET `/openai/v1/models` lets the agent make images but not start video jobs or read your request history. The agent's calls are logged for review.
