# Midjourney V7 > ادغام مدل هوش مصنوعی midjourney-v7 از طریق API با کارایی بالا و تعرفه مصرف منعطف. ## نمای کلی - **نقطه پایانی**: `POST https://api.muapi.ai/api/v1/midjourney-v7` - **مدل‌ها ID**: `midjourney-v7` - **دسته‌بندی**: متن به تصویر - **نسخه مدل**: Midjourney V7 - **خانواده مدل**: midjourney - **هزینه**: 0.1 credits(مدل‌ها) ## API MuApi ****:, `request_id`,, `status` `completed`。 `?webhook=YOUR_URL`, POST ()。 ****: `x-api-key` MuApi 。 https://muapi.ai/access-keys 。 ### 1. ```http POST https://api.muapi.ai/api/v1/midjourney-v7 Content-Type: application/json x-api-key: YOUR_API_KEY ``` **():** ```json { "prompt": "" } ``` **(همه):** ```json { "prompt": "", "image_url": "https://example.com/your-image_url", "aspect_ratio": "1:1", "stylize": 100, "chaos": 0, "weird": 0, "negative_prompt": "", "seed": 0 } ``` **:** ```json { "request_id": "abc123", "status": "processing" } ``` ### 2. نتیجه ```http GET https://api.muapi.ai/api/v1/predictions/{request_id}/result x-api-key: YOUR_API_KEY ``` `status` :`queued`、`pending`、`processing`、`completed`、`failed`、`cancelled`。 2–5 ,。 `completed` ,نتیجه URL `outputs` 。 **`completed` :** ```json { "id": "abc123", "status": "completed", "outputs": [ "https://cdn.muapi.ai/.../output.png" ], "urls": { "get": "https://api.muapi.ai/api/v1/predictions/abc123/result" }, "created_at": "2026-05-08T12:34:56Z", "has_nsfw_contents": [] } ``` ### CURL ```bash 1. REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/midjourney-v7 \ -H "x-api-key: $MUAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":""}' | jq -r .request_id) 2. while :; do RESP=$(curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY") STATUS=$(echo "$RESP" | jq -r .status) [ "$STATUS" = "completed" ] && echo "$RESP" | jq .outputs && break [ "$STATUS" = "failed" ] && echo "$RESP" && exit 1 sleep 3 done ``` ### پایتون ```python import os, time, requests API = "https://api.muapi.ai/api/v1" headers = {"x-api-key": os.environ["MUAPI_API_KEY"]} r = requests.post(f"{API}/midjourney-v7", headers=headers, json={"prompt":""}) request_id = r.json()["request_id"] while True: res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json() if res["status"] == "completed": print(res["outputs"]); break if res["status"] == "failed": raise RuntimeError(res.get("error")); time.sleep(3) ``` ## طرح ورودی (Input Schema) API : - **`prompt`** (`string`, __): تنظیم پارامتر Text description of the image to generate. جهت هدایت دقیق فرآیند تولید مدل. - **`image_url`** (`string`, __): اختیاری reference image URL. Influences the style and content of the generation. - **`aspect_ratio`** (`string`, __): نسبت ابعاد تصویر خروجی (مانند 16:9 یا 1:1). - پیش‌فرض: `"1:1"` - گزینه‌ها: `"1:1"`, `"16:9"`, `"9:16"`, `"3:4"`, `"4:3"`, `"21:9"` - **`stylize`** (`int`, __): تنظیم پارامتر Controls how artistic the result is. Range: 0–1000. Lower = more literal, higher = more stylized. جهت هدایت دقیق فرآیند تولید مدل. - پیش‌فرض: `100` - **`chaos`** (`int`, __): تنظیم پارامتر Controls variation between the 4 images. Range: 0–100. Higher = more diverse. جهت هدایت دقیق فرآیند تولید مدل. - پیش‌فرض: `0` - **`weird`** (`int`, __): تنظیم پارامتر Adds unconventional aesthetics. Range: 0–3000. جهت هدایت دقیق فرآیند تولید مدل. - پیش‌فرض: `0` - **`negative_prompt`** (`string`, __): تنظیم پارامتر Things to exclude from the image, e.g. "text, watermark". جهت هدایت دقیق فرآیند تولید مدل. - **`seed`** (`int`, __): تنظیم پارامتر Reproducibility seed. Range: 0–4294967295. Same seed + same prompt ≈ similar result. جهت هدایت دقیق فرآیند تولید مدل. - پیش‌فرض: `0` ## طرح خروجی (Output Schema) : - **`id`** (`string`): ID。 - **`status`** (`string`): :`queued`、`pending`、`processing`、`completed`、`failed`、`cancelled`。 - **`outputs`** (`array`): تصویر、ویدیوصدا URL。`status` `completed` 。 - **`urls.get`** (`string`): نتیجه。 - **`error`** (`string` | `null`): `status` `failed` 。 - **`created_at`** (`string`): ISO-8601 。 - **`has_nsfw_contents`** (`array of boolean`): NSFW 。 ## Webhook() URL `?webhook=https://your-server/path`。,MuApi POST URL,。 ## Agent MuApi MCP CLI, Agent(Claude Code、Cursor Agent) HTTP : ```bash # CLI npm install -g muapi-cli # muapi auth login # MuApi مدل‌ها MCP Agent muapi mcp serve ``` MCP مدل‌ها, `midjourney-v7`。 `muapi --help` (`muapi image generate`、`muapi video from-image` )。 ## مدل‌ها - [Midjourney V8](https://muapi.ai/fa/playground/midjourney-v8) - [Midjourney V7](https://muapi.ai/fa/playground/midjourney-v7) - [Midjourney Niji](https://muapi.ai/fa/playground/midjourney-niji) ## منابع و مستندات - [زمین بازی](https://muapi.ai/fa/playground/midjourney-v7) - [API ](https://muapi.ai/fa/playground/midjourney-v7/api) - [ llms.txt](https://muapi.ai/fa/llms.txt)