# FLUX 3 API

> Image generation via Echo, billed by actual USD cost per request

- Model ID: `flux-3`
- Provider: BFL
- Tasks: Text to Image, Image
- Price: Provider cost USD / image; actual cost from Echo usage API
- Web page: https://scalingtensor.com/models/flux-3

## How to call it

Authenticate with the `apiKey` request header. Submit a job, then poll for the result:

1. `POST https://restapi.scalingtensor.com/api/media/generate` with JSON `{ "model": "<model ID>", "params": { ... } }`. The response `data.jobId` identifies the job.
2. `GET https://restapi.scalingtensor.com/api/media/result?jobId=<jobId>` until the status is `completed` or `failed`.
3. A response `code` of 0 means success; otherwise read `msg`.

```bash
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "flux-3",
  "params": {
    "n": 1,
    "size": "1024x1024",
    "prompt": "A Shiba Inu walking along the seaside at dusk"
  }
}'
```

## Input parameters

Parameters go inside the `params` object.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | true | Describe the image to generate. Put these fields in params when calling /api/media/generate, with the top-level model set to flux-3. |
| `size` | string | false | Default: 1024x1024. Use WIDTHxHEIGHT or one of these aspect ratios: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16. Custom dimensions must match a supported ratio within 1%. Output is approximately 1K: 1536x1024 produces 1248x832 and 16:9 produces 1360x768. |
| `n` | integer | false | Number of images. Only 1 is supported; default: 1. |

## FAQ

### How much does the FLUX 3 API cost?

FLUX 3 is billed at the provider's actual cost for each job (USD / image; actual cost from Echo usage API). The charge is deducted from your prepaid ScalingTensor wallet.

### How do I call the FLUX 3 API?

Send POST /api/media/generate with "model": "flux-3" and the parameters in a params object, using your apiKey header. The call returns a jobId. Poll GET /api/media/result?jobId=... until the status is completed, then read the output URL from the result.

### Which parameters does FLUX 3 accept?

Required: prompt. Optional: size and n. The parameter table on this page describes each one.

### Do I need a BFL account to use FLUX 3?

No. You call FLUX 3 with your ScalingTensor API key and pay from your ScalingTensor wallet. The same key works for every other model in the catalog.
