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

# Apps

> Find, run, and create ImagineArt Apps through the API, and see what a run costs.

Apps are multi-step pipelines built by creators on ImagineArt. You run an App with one request and poll it like a generation. Browse them at [https://open.imagine.art/apps](https://open.imagine.art/apps).

## 1. Find an App

`GET /flow/app/` lists public Apps; add `scope=mine` for your own. `GET /flow/app/{id}` returns one App by its `id`.

```json theme={null}
{
  "id": "app_8c1f...",
  "name": "Product shot to ad",
  "base_cost": 2916,
  "monetization": "low",
  "inputs": [
    { "id": "in_1", "handle": "imageUrl", "node_id": "n_3", "node_type": "ImageUpload" }
  ]
}
```

## 2. Run it

Send each input back with a `value`.

```bash theme={null}
curl -X POST https://api.imagine.art/v1/flow/app/run \
  -H "Authorization: Bearer $IMAGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "app_8c1f...",
    "execution_count": 1,
    "inputs": [
      { "id": "in_1", "handle": "imageUrl", "node_id": "n_3", "node_type": "ImageUpload",
        "value": "https://example.com/bottle.png" }
    ]
  }'
```

## 3. Poll the run

`GET /flow/app/{task_id}/status` returns the run's `status` and `outputs`. A finished output's URL is at `outputs[].content.<type>.content`. `GET /flow/app/{app_id}/results` lists past runs.

## 4. Create your own App

`POST /flow/app` creates an App from a workflow graph in one request. Send the graph's `nodes` and `edges` (the shape `GET /flow/app/{id}/graph` returns), the `inputs` people fill in and a `parameters` entry for each. `inputs`, `parameters`, `input_presets` and `base_cost` are required, even if empty. Apps you create can be deleted with `DELETE /flow/app/{id}` but not edited yet.

```bash theme={null}
curl -X POST https://api.imagine.art/v1/flow/app \
  -H "Authorization: Bearer $IMAGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Photo Upscaler",
    "slug": "photo-upscaler-a1b2c3",
    "description": "Upscales a photo 2x.",
    "graph": {
      "nodes": [{ "id": "n1", "type": "upscale-image", "data": { … } }],
      "edges": []
    },
    "inputs": [
      { "id": "in1", "name": "", "description": "", "handle": "imageUrl",
        "node_id": "n1", "node_type": "upscale-image" }
    ],
    "parameters": [
      { "id": "in1", "type": "image", "label": "Photo", "required": true,
        "order": 0, "default": "", "options": [], "limit": 1, "version": 2 }
    ],
    "input_presets": [],
    "base_cost": 20
  }'
```

## Pricing

A run costs `base_cost` plus the creator fee for the App's `monetization` tier.

| monetization | Creator fee (credits) |
| - | - |
| none | 0 |
| low | 10 |
| medium | 20 |
| high | 30 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.