# Frameport Image 1 API

> Frameport Image 1 generates and edits from up to 10 reference pictures, so a face, an outfit, a product and a place stay the same from one image to the next.

Frameport Image 1, a Frameport engine, called with one API key: from $0.025 per image, charged only when the image succeeds.

- Model id: `fp-image-1`
- Type: image
- Maker: Frameport
- Tasks: Text to image, Image to image
- Endpoint: `POST https://frameport.ai/v1/images/generations`
- Page: https://frameport.ai/models/fp-image-1
- Every model, as JSON: https://frameport.ai/models.json

## Pricing

| Item | Price |
| --- | --- |
| One image, any aspect ratio | $0.025 |
| Each reference picture after the first | $0.0025 |

- Charged once, and only when the image succeeds. A failed job costs $0.00: its hold is released in full.
- The exact price is known before the run: the API returns it as `reserved_usd` when it accepts the job.
- A request makes 1 to 4 images, each charged at this price.

## Options

| Option | Value |
| --- | --- |
| Tasks | Text to image, Image to image |
| Aspect ratios | 1:1, 3:4, 4:3, 9:16, 16:9 |
| Images per request | 1 to 4 |
| Reference pictures | Up to 10, edits by instruction |
| Negative prompt | Not supported |
| Private mode | Supported: nothing kept, not even the prompt |
| Prompt | Up to 2,400 characters |
| Output | Image files, signed links valid about an hour |
| Billing unit | Per image |
| Model id | `fp-image-1` |

## Frameport Image 1 API parameters

`POST https://frameport.ai/v1/images/generations` with a JSON body and your key as a Bearer token:

| Field | Values | Notes |
| --- | --- | --- |
| `model` (required) | "fp-image-1" | Required. |
| `prompt` (required) | text, up to 2,400 characters | Required: the subject, the setting, the light and the style. |
| `n` | 1 to 4 | 1 when left out. Each image is charged. |
| `aspect_ratio` | 1:1, 3:4, 4:3, 9:16, 16:9 | 1:1 when left out. The same price at every ratio. |
| `reference_images` | up to 10 pictures | Pictures to edit or to keep: faces, products, places. An https URL or a base64 data URI each. Each picture after the first adds $0.0025. |
| `private` | true or false | false when left out. true keeps nothing, not even the prompt: each image comes back once, as b64_json, in the read that completes it. |

## Frameport Image 1 request bodies, one per mode

### Text to image · $0.025

```json
{
  "model": "fp-image-1",
  "prompt": "The ceramic mug from the first picture on a walnut desk beside a window, morning light, product photo",
  "n": 1,
  "aspect_ratio": "16:9"
}
```

### Edit from pictures · $0.0275

```json
{
  "model": "fp-image-1",
  "prompt": "Put the mug from the first picture on the desk from the second picture, morning light",
  "n": 1,
  "aspect_ratio": "16:9",
  "reference_images": [
    "https://example.com/mug.jpg",
    "https://example.com/desk.jpg"
  ]
}
```

## Submit, poll, download

### cURL

```bash
# 1. Submit: the price is held on your balance (reserved_usd)
curl https://frameport.ai/v1/images/generations \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-image-1",
    "prompt": "The ceramic mug from the first picture on a walnut desk beside a window, morning light, product photo",
    "n": 1,
    "aspect_ratio": "16:9"
  }'

# 2. Poll with the id it returns, until "succeeded" or "failed"
curl https://frameport.ai/v1/images/generations/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"

# 3. Download outputs[0].url once it has succeeded (a signed link, no key needed)
curl -L "$OUTPUT_URL" -o out.png
```

### Python

```python
import os, time
import requests

API = "https://frameport.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['FRAMEPORT_API_KEY']}"}

# 1. Submit: the price is held on your balance (reserved_usd)
gen = requests.post(f"{API}/images/generations", headers=headers, json={
    "model": "fp-image-1",
    "prompt": "The ceramic mug from the first picture on a walnut desk beside a window, morning light, product photo",
    "n": 1,
    "aspect_ratio": "16:9",
}).json()
if gen.get("error"):
    raise SystemExit(gen["error"]["message"])

# 2. Poll until it succeeds or fails
while gen["status"] in ("queued", "running"):
    time.sleep(3)
    gen = requests.get(f"{API}/images/generations/{gen['id']}", headers=headers).json()

# A failed generation costs nothing: the hold is released
if gen["status"] == "failed":
    raise SystemExit(gen["error"]["message"])

# 3. Download the file (a signed link, no key needed)
file = requests.get(gen["outputs"][0]["url"])
open("out.png", "wb").write(file.content)
print("saved out.png", gen["cost_usd"])
```

### JavaScript

```js
import { writeFile } from 'node:fs/promises'

const API = 'https://frameport.ai/v1'
const headers = {
  'Authorization': `Bearer ${process.env.FRAMEPORT_API_KEY}`,
  'Content-Type': 'application/json',
}

// 1. Submit: the price is held on your balance (reserved_usd)
let gen = await fetch(`${API}/images/generations`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    model: 'fp-image-1',
    prompt: 'The ceramic mug from the first picture on a walnut desk beside a window, morning light, product photo',
    n: 1,
    aspect_ratio: '16:9',
  }),
}).then(res => res.json())
if (gen.error) throw new Error(gen.error.message)

// 2. Poll until it succeeds or fails
while (gen.status === 'queued' || gen.status === 'running') {
  await new Promise(resolve => setTimeout(resolve, 3000))
  gen = await fetch(`${API}/images/generations/${gen.id}`, { headers }).then(res => res.json())
}
// A failed generation costs nothing: the hold is released
if (gen.status === 'failed') throw new Error(gen.error.message)

// 3. Download the file (a signed link, no key needed)
const file = await fetch(gen.outputs[0].url)
await writeFile('out.png', Buffer.from(await file.arrayBuffer()))
console.log('saved out.png', gen.cost_usd)
```

## What Frameport Image 1 is good at

- Consistency: a character, an outfit, a product and a location can all ride into the same render.
- Edits by instruction: send a picture, write the change ("make it night"), and the picture keeps its own frame.
- The same price at every format.

## How to prompt Frameport Image 1

1. Say what each reference is for: whose face, which outfit, which product, which place.
2. For an edit, write the change rather than the whole scene: "change the background to a beach at sunset".
3. There is no negative prompt on this engine: describe the result you want.

Sample prompt: “The ceramic mug from the first picture on a walnut desk beside a window, morning light, product photo”

## Frameport Image 1 and the other Frameport image models

| Model | Model id | Per image | Reference pictures | Edits |
| --- | --- | --- | --- | --- |
| [Frameport Image 2](https://frameport.ai/models/fp-image-2.md) | `fp-image-2` | $0.025 | 4 | No |
| [Frameport Image 3](https://frameport.ai/models/fp-image-3.md) | `fp-image-3` | $0.025 | 4 | No |
| Frameport Image 1 | `fp-image-1` | $0.025 | 10 | Yes |

## About the Frameport Image 1 API

### How much does the Frameport Image 1 API cost?

Frameport Image 1 costs $0.025 per image, plus $0.0025 for each reference picture after the first. A request makes 1 to 4 images and each one is charged, once, only when it succeeds.

### How do I call Frameport Image 1 from code?

Send POST /v1/images/generations with "model": "fp-image-1" and a prompt, your API key as a Bearer token. The answer is a generation with an id: poll GET /v1/images/generations/{id} until its status is succeeded, then download each outputs[].url.

### What happens if a Frameport Image 1 generation fails?

Nothing is charged. The price is held on your balance when the job starts and released in full if it fails: cost_usd stays at 0.

### Can Frameport Image 1 work from reference pictures?

Yes: send up to 10 pictures in reference_images, as https URLs or base64 data URIs, and say in the prompt what each one is for. To edit a picture, send it and write the change.

### Which aspect ratios does Frameport Image 1 support?

1:1, 3:4, 4:3, 9:16 and 16:9, at the same price.

### Do I need a subscription?

No. You top up a prepaid balance in dollars, from $10, and it never expires. Every model runs on the same balance and the same API key.

## Compare with similar models

- [Frameport Image 2](https://frameport.ai/models/fp-image-2.md) (`fp-image-2`): Frameport, from $0.025 per image
- [Frameport Image 3](https://frameport.ai/models/fp-image-3.md) (`fp-image-3`): Frameport, from $0.025 per image
- [GPT Image 2.5 Sunburst](https://frameport.ai/models/gpt-image-2-5-sunburst.md) (`gpt-image-2-5-sunburst`): OpenAI, from $0.085 per image
- [GPT Image 2.5 Flare](https://frameport.ai/models/gpt-image-2-5-flare.md) (`gpt-image-2-5-flare`): OpenAI, from $0.085 per image
- [Nano Banana 2.1](https://frameport.ai/models/nano-banana-2-1.md) (`nano-banana-2-1`): Google, from $0.085 per image
- [Flux 3 Image](https://frameport.ai/models/flux-3-image.md) (`flux-3-image`): Black Forest Labs, from $0.088 per image
