@runapi.ai/flux-2 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/skills/flux-2/README.md +35 -3
- package/skills/flux-2/SKILL.md +71 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runapi.ai/flux-2",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "RunAPI Flux 2 SDK for JavaScript, Ruby, and Go",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "rm -rf dist"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@runapi.ai/core": "^0.2.
|
|
31
|
+
"@runapi.ai/core": "^0.2.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.0.0",
|
package/skills/flux-2/README.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/runapi-ai/flux-2">
|
|
3
|
+
<h3 align="center">Flux 2 API Skill for RunAPI</h3>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Install this agent skill, inspect Flux 2 fields, then run jobs through the RunAPI CLI.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://runapi.ai/models/flux-2"><strong>Model Reference</strong></a> · <a href="https://github.com/runapi-ai/cli"><strong>CLI</strong></a> · <a href="https://github.com/runapi-ai/flux-2-sdk"><strong>SDK</strong></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+
[](https://www.skills.sh/runapi-ai/flux-2/flux-2)
|
|
18
|
+
[](https://clawhub.ai/runapi-ai/runapi-flux-2)
|
|
19
|
+
[](https://github.com/runapi-ai/flux-2/blob/main/LICENSE)
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
<br/>
|
|
2
23
|
|
|
3
24
|
Generate images with Flux 2 Pro and Flex text-to-image and image-to-image. This skill helps Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents integrate Flux 2 through RunAPI.
|
|
4
25
|
|
|
@@ -7,10 +28,21 @@ The canonical agent file is `skills/flux-2/SKILL.md`.
|
|
|
7
28
|
## Install
|
|
8
29
|
|
|
9
30
|
```bash
|
|
10
|
-
npx skills add runapi-ai/
|
|
31
|
+
npx skills add runapi-ai/flux-2 -g
|
|
11
32
|
```
|
|
12
33
|
|
|
13
|
-
Or
|
|
34
|
+
Or paste this prompt to your AI agent:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
Install the flux-2 skill for me:
|
|
38
|
+
|
|
39
|
+
1. Clone https://github.com/runapi-ai/flux-2
|
|
40
|
+
2. Copy the skills/flux-2/ directory into your
|
|
41
|
+
user-level skills directory (e.g. ~/.claude/skills/
|
|
42
|
+
for Claude Code, ~/.codex/skills/ for Codex).
|
|
43
|
+
3. Verify that SKILL.md is present.
|
|
44
|
+
4. Confirm the install path when done.
|
|
45
|
+
```
|
|
14
46
|
|
|
15
47
|
## Quick example
|
|
16
48
|
|
package/skills/flux-2/SKILL.md
CHANGED
|
@@ -1,22 +1,79 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flux-2
|
|
3
|
-
description: Generate images with Flux 2
|
|
4
|
-
documentation: https://runapi.ai/models/flux-2
|
|
5
|
-
provider_page: https://runapi.ai/providers/black-forest-labs
|
|
6
|
-
catalog: https://runapi.ai/models
|
|
3
|
+
description: Generate and edit images with Flux 2 through RunAPI. Use when the user asks an agent to create, edit, or transform images with Flux 2. Default to the RunAPI CLI for one-off generation; use SDKs only when the user is integrating RunAPI into an app or backend.
|
|
4
|
+
documentation: https://runapi.ai/models/flux-2.md
|
|
5
|
+
provider_page: https://runapi.ai/providers/black-forest-labs.md
|
|
6
|
+
catalog: https://runapi.ai/models.md
|
|
7
|
+
metadata:
|
|
8
|
+
openclaw:
|
|
9
|
+
homepage: https://runapi.ai/models/flux-2
|
|
10
|
+
requires:
|
|
11
|
+
bins:
|
|
12
|
+
- runapi
|
|
13
|
+
install:
|
|
14
|
+
- kind: brew
|
|
15
|
+
formula: runapi-ai/tap/runapi
|
|
16
|
+
bins:
|
|
17
|
+
- runapi
|
|
18
|
+
envVars:
|
|
19
|
+
- name: RUNAPI_API_KEY
|
|
20
|
+
required: false
|
|
21
|
+
description: Optional RunAPI API key; agents should prefer environment auth or saved CLI config. Browser login is interactive fallback only.
|
|
7
22
|
---
|
|
8
|
-
# @runapi.ai/flux-2 — RunAPI.ai Flux 2 image generation
|
|
9
23
|
|
|
10
|
-
|
|
24
|
+
# Flux 2 on RunAPI
|
|
11
25
|
|
|
12
|
-
|
|
13
|
-
import { Flux2Client } from '@runapi.ai/flux-2';
|
|
26
|
+
Generate and edit images with Flux 2 through RunAPI. The default path for one-off agent tasks is the `runapi` CLI; SDKs are for application integration.
|
|
14
27
|
|
|
15
|
-
|
|
28
|
+
## Routing decision
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
- One-off generation, editing, or transformation for the user → use the **CLI path** with the `runapi` binary.
|
|
31
|
+
- Building an app, backend, worker, library, or production codebase → use the **SDK integration path**.
|
|
32
|
+
|
|
33
|
+
## CLI path
|
|
34
|
+
|
|
35
|
+
The `runapi` binary is the runtime dependency. Run `runapi auth status` first. For agents and headless runs, prefer `RUNAPI_API_KEY` or import it into saved config with `printf '%s' "$RUNAPI_API_KEY" | runapi auth import-token --token -`. Use `runapi login` only when the user explicitly wants interactive browser auth.
|
|
36
|
+
|
|
37
|
+
Inspect the available actions and request fields with CLI help:
|
|
38
|
+
|
|
39
|
+
```shell
|
|
40
|
+
runapi flux-2 --help
|
|
41
|
+
runapi flux-2 text-to-image --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Run a one-off task (synchronous — polls until the task completes):
|
|
45
|
+
|
|
46
|
+
```shell
|
|
47
|
+
runapi flux-2 text-to-image --input-file request.json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Submit asynchronously and poll separately:
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
runapi flux-2 text-to-image --async --input-file request.json
|
|
54
|
+
runapi wait <task-id> --service flux-2 --action text-to-image
|
|
22
55
|
```
|
|
56
|
+
|
|
57
|
+
Available actions: `text-to-image`.
|
|
58
|
+
|
|
59
|
+
## SDK integration path
|
|
60
|
+
|
|
61
|
+
When integrating Flux 2 into an app, backend, worker, or library — not for one-off tasks — use a RunAPI SDK package:
|
|
62
|
+
|
|
63
|
+
- JavaScript / TypeScript: `@runapi.ai/flux-2`
|
|
64
|
+
- Ruby: `runapi-flux_2`
|
|
65
|
+
- Go: `github.com/runapi-ai/flux-2-sdk/go`
|
|
66
|
+
|
|
67
|
+
## References
|
|
68
|
+
|
|
69
|
+
- Model overview, pricing, and rate limits: https://runapi.ai/models/flux-2.md
|
|
70
|
+
- Provider comparison: https://runapi.ai/providers/black-forest-labs.md
|
|
71
|
+
- Full model catalog: https://runapi.ai/models.md
|
|
72
|
+
|
|
73
|
+
## Variants
|
|
74
|
+
|
|
75
|
+
- [Flux 2 Pro text to image](https://runapi.ai/models/flux-2/pro-text-to-image.md)
|
|
76
|
+
- [Flux 2 Pro image to image](https://runapi.ai/models/flux-2/pro-image-to-image.md)
|
|
77
|
+
- [Flux 2 Flex text to image](https://runapi.ai/models/flux-2/flex-text-to-image.md)
|
|
78
|
+
- [Flux 2 Flex image to image](https://runapi.ai/models/flux-2/flex-image-to-image.md)
|
|
79
|
+
|