|
1 | | -# video-api-tutorial — ai api gateway (English) |
| 1 | +# Wan 2.7 Image API (`wan2.7-image`) |
2 | 2 |
|
3 | | -> **One OpenAI-compatible key, 300+ models** · image2.5 **$0.0085/image** · Seedance 2.0 Mini **$0.01056/sec** · LLM from **$0.0228 / M tokens** · $1 minimum top-up. |
| 3 | +<!-- conv-kit:v1 --> |
4 | 4 |
|
5 | | -**[See live pricing](https://go.apimart.ai/k-ec7441)** · **[Get an API key](https://go.apimart.ai/k-75e67d)** |
| 5 | +<p align="center"> |
| 6 | + <img src="assets/badges/price.svg" alt="observed unit price"> <img src="assets/badges/billing.svg" alt="billing model"> <img src="assets/badges/compat.svg" alt="OpenAI-compatible endpoint"> |
| 7 | +</p> |
6 | 8 |
|
7 | | -video-api-tutorial keeps one `base_url` and one key in front of 300+ models — USD settlement, pay-as-you-go, $1 minimum top-up. |
| 9 | +<p align="center"> |
| 10 | + <img src="assets/01-product-hero-perfume.jpg" width="820" alt="Sample render via the APIMart image API"> |
| 11 | +</p> |
8 | 12 |
|
9 | | -## Published unit prices (snapshot 2026-09-28) |
| 13 | +> **from $0.0216 per image** — one OpenAI-compatible endpoint at `https://api.apimart.ai/v1`, no monthly plan required. *(observed 2026-10-12)* |
10 | 14 |
|
11 | | -| Unit | Price | |
12 | | -| --- | --- | |
13 | | -| `GPT Image 2.5 (1K)` | $0.0085 | |
14 | | -| `Seedance 2.0 Mini (480P/sec)` | $0.01056 | |
15 | | -| `Qwen3.7 Flash (per M input)` | $0.0228568 | |
| 15 | +**[Get an API key](https://go.apimart.ai/k-9bc680)** · **[Live pricing](https://go.apimart.ai/k-f2e4f9)** · **[Model page](https://go.apimart.ai/k-638a85)** · [⚡ 60-second quickstart](#quickstart) |
| 16 | + |
| 17 | +**Why teams call Wan 2.7 Image (`wan2.7-image`) through APIMart** |
| 18 | + |
| 19 | +- **One key, entire catalog.** The same `https://api.apimart.ai/v1` base URL and `Authorization` header reach Wan 2.7 Image (`wan2.7-image`) and 300+ other image, video and language models — switch the `model` field, not your client. |
| 20 | +- **$1 minimum, pay as you go.** No subscription and no prepaid plan to size up front: top up from $1 and spend it on calls. |
| 21 | +- **The charge comes back in the response.** Every completed task reports the amount billed (`cost` / `credits_cost`); a task marked `failed` is refunded. |
| 22 | +- **Async by design.** Submit, take the `task_id`, poll `GET /v1/tasks/{id}` — batching and retries are ordinary queue work, not a bespoke integration. |
| 23 | + |
| 24 | +<!-- /conv-kit:v1 --> |
| 25 | + |
| 26 | +Wan 2.7 Image is Alibaba's Wan text-to-image model in standard and Pro versions for high-quality images. |
| 27 | + |
| 28 | +## Model id and routes |
| 29 | + |
| 30 | +| Route | `model` value | Billing | Notes | |
| 31 | +| --- | --- | --- | --- | |
| 32 | +| Per-image | `wan2.7-image` | per delivered image, by resolution | see the [model page](https://go.apimart.ai/k-638a85) for the exact tiers | |
| 33 | + |
| 34 | +Endpoint: `POST https://api.apimart.ai/v1/images/generations` (OpenAI-compatible), then poll `GET /v1/tasks/{task_id}`. |
| 35 | + |
| 36 | +## Pricing |
| 37 | + |
| 38 | +<!-- pricing:model:start --> |
| 39 | +| Output | List price | Effective price | |
| 40 | +| --- | --- | --- | |
| 41 | +| default | 0.027 | 0.0216 | |
| 42 | + |
| 43 | + |
| 44 | +<!-- pricing:model:end --> |
| 45 | + |
| 46 | +Prices are a snapshot; the [pricing page](https://go.apimart.ai/k-f2e4f9) and [`data/model.json`](data/model.json) are refreshed by CI, and a completed task reports the exact amount in its `cost` field. |
| 47 | + |
| 48 | +## Request parameters |
| 49 | + |
| 50 | +| Field | Type | Default | Notes | |
| 51 | +| --- | --- | --- | --- | |
| 52 | +| `model` | string | required | the model id shown in the route table above | |
| 53 | +| `prompt` | string | required | what to generate, or what to change when editing | |
| 54 | +| `size` | string | `auto` / `1:1` | aspect ratio, or `auto` where the route supports it | |
| 55 | +| `resolution` | string | `1K` | output resolution tier — cost scales with it | |
| 56 | +| `n` | integer | `1` | number of images per task, where the route allows more than one | |
| 57 | +| `image_urls` | string[] | — | reference images as public HTTP(S) URLs or base64 data URLs | |
| 58 | +| `nsfw_check` | boolean | `false` | runs `omni-moderation-latest` before submitting | |
| 59 | + |
| 60 | +The table lists the fields accepted by the APIMart OpenAI-compatible image endpoint. Check the [model page](https://go.apimart.ai/k-638a85) for anything this model adds on top. |
16 | 61 |
|
17 | 62 | ## Quickstart |
18 | 63 |
|
19 | 64 | ```bash |
20 | | -curl -X POST https://api.apimart.ai/v1/images/generations \ |
21 | | - -H 'Authorization: Bearer $APIMART_KEY' \ |
22 | | - -H 'Content-Type: application/json' \ |
23 | | - -d '{"model":"gpt-image-2.5-ext","prompt":"cozy reading nook, warm lamp, cinematic","size":"1:1","resolution":"1K","n":1}' |
| 65 | +curl --request POST --url https://api.apimart.ai/v1/images/generations \ |
| 66 | + --header "Authorization: Bearer $APIMART_API_KEY" --header 'Content-Type: application/json' \ |
| 67 | + -d '{"model":"wan2.7-image","prompt":"A bamboo forest at sunrise, slow push-in","size":"1:1","resolution":"1K"}' |
24 | 68 | ``` |
25 | 69 |
|
26 | | -Async: submit → get `task_id` → poll `GET https://api.apimart.ai/v1/tasks/<task_id>` → read `cost` / `credits_cost` from the result. Parameter tables, `version`/`resolution`/`size` options and idempotency headers are documented on the model page reachable from the pricing link above. |
| 70 | +```python |
| 71 | +import os, time, requests |
| 72 | + |
| 73 | +BASE = "https://api.apimart.ai/v1" |
| 74 | +HEADERS = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}", "Content-Type": "application/json"} |
| 75 | + |
| 76 | +created = requests.post(f"{BASE}/images/generations", headers=HEADERS, timeout=60, json={ |
| 77 | + "model": "wan2.7-image", "prompt": "A bamboo forest at sunrise, slow push-in", |
| 78 | +}).json() |
| 79 | +task_id = created["data"]["id"] |
| 80 | + |
| 81 | +while True: |
| 82 | + task = requests.get(f"{BASE}/tasks/{task_id}", headers=HEADERS, timeout=60).json()["data"] |
| 83 | + if task["status"] in ("completed", "failed"): |
| 84 | + break |
| 85 | + time.sleep(5) |
| 86 | +print(task.get("cost"), task["result"]["images"][0]["url"]) |
| 87 | +``` |
| 88 | + |
| 89 | +Runnable versions: [`examples/`](examples). The task lifecycle is `pending → processing → completed | failed`. |
| 90 | + |
| 91 | +## FAQ |
27 | 92 |
|
28 | | -## Keywords |
| 93 | +**What is the Wan 2.7 Image model id?** |
29 | 94 |
|
30 | | -`reverse-engineered` · `reverse engineering` · `ai api gateway` · `ai-api-gateway` · `api relay` · `中转站` · `nano banana 2 api` · `gpt-image-2.5 api` · `ai api pricing` · `pay-as-you-go` |
| 95 | +`wan2.7-image`. See the route table above. |
31 | 96 |
|
32 | | -## Platform facts |
| 97 | +**How is it billed?** |
33 | 98 |
|
34 | | -- USD settlement, pay-as-you-go, **$1 minimum top-up**, no subscription. |
35 | | -- Operating since last year; ~100,000 registered users, mostly enterprise accounts. |
36 | | -- International invoices available on request. |
37 | | -- 307 models online (live `/v1/models`) as of 2026-09-28. |
| 99 | +**from $0.0216 per image**. The completed task reports the exact amount in its `cost` field; a failed task is refunded. |
| 100 | + |
| 101 | +**How do I get a key?** |
| 102 | + |
| 103 | +Use the [Get an API key](https://go.apimart.ai/k-9bc680) link — $1 minimum top-up, no plan required. |
| 104 | + |
| 105 | +## Attributed links (how this repository is measured) |
| 106 | + |
| 107 | +| Purpose | Attributed link | Target | |
| 108 | +| --- | --- | --- | |
| 109 | +| Model page | <https://go.apimart.ai/k-638a85> | `apimart.ai/fr/model/wan-2-7-image` | |
| 110 | +| Live pricing | <https://go.apimart.ai/k-f2e4f9> | `apimart.ai/fr/pricing` | |
| 111 | +| Get an API key | <https://go.apimart.ai/k-9bc680> | `apimart.ai/fr/keys` | |
| 112 | + |
| 113 | +Outbound APIMart links are minted through the promo link API; hand-made tracking parameters are rejected by |
| 114 | +`tools/check_links.py` in CI. |
38 | 115 |
|
39 | 116 | ## Disclosure |
40 | 117 |
|
41 | | -This repository documents **APIMart**, a third-party API aggregator/gateway. It is **not affiliated with, endorsed by, or sponsored by** OpenAI, Google, Anthropic, xAI, ByteDance or any model vendor. Model names and trademarks belong to their owners. Prices are a point-in-time snapshot and may change; the vendor's console billing is authoritative. |
| 118 | +Wan 2.7 Image is a third-party model served through APIMart; this repository documents how to call it and publishes |
| 119 | +model ids and prices, and does not claim official status. Model names, prices and documentation belong to their |
| 120 | +respective owners. |
| 121 | + |
| 122 | +## License |
42 | 123 |
|
| 124 | +MIT — see [LICENSE](LICENSE). |
0 commit comments