参数
prompt必填类型
text
取值
text description
默认值
required
价格
—
Midjourney 支持文本和图像生成。按图计费。
midjourney:white该模型在目录中仅公布最低价格。
Midjourney 支持文本和图像生成。按图计费。
生成是异步的:先创建任务,然后轮询状态直至完成。
在 Bearer 请求头中传递密钥。API 会返回 jobId 用于轮询状态。
curl -sS https://getvibeapi.com/api/media/generate \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model":"midjourney:white","prompt":"a beautiful landscape","opts":{"operation":"imagine"}}'const response = await fetch('https://getvibeapi.com/api/media/generate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GETVIBE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "midjourney:white",
"prompt": "a beautiful landscape",
"opts": {
"operation": "imagine"
}
}),
});
if (!response.ok) throw new Error(`GetVibe API: ${response.status}`);
const { jobId } = await response.json();
console.log(jobId);通过 GetVibe API 向 Midjourney 发起请求的参数。
prompt必填image_urloperationimage_file_idimage_base64| 参数 | 类型 | 取值 | 默认值 | 价格 |
|---|---|---|---|---|
prompt必填 | text | text description | required | — |
image_url | URL | Public image URL | — | — |
operation | option selection | Imagine (default) · Action · Turbo | Imagine | Included in the base price |
image_file_id | text | Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…) | — | Included in the base price |
image_base64 | text | Alternative to image_url: the file inline, as base64 or a data: URI | — | Included in the base price |
请求:POST https://getvibeapi.com/api/media/generate。价格以 USD 计。
Midjourney 的价格待确认:供应商尚未发布该契约的初步确认价格。价格确认后即可生成。
Midjourney 的机器可读契约包含请求 schema、操作、限制、轮询和响应示例。
# Midjourney
公开模型:midjourney:white
创建任务: POST /api/media/generate
检查状态: GET /api/media/jobs/{jobId}
## 输入参数
- `prompt` (text): text description; 默认: required
- `image_url` (URL): Public image URL; 默认: —
- `operation` (option selection): Imagine (default) · Action · Turbo; 默认: Imagine
- `image_file_id` (text): Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…); 默认: —
- `image_base64` (text): Alternative to image_url: the file inline, as base64 or a data: URI; 默认: —
## 公开变体
- `midjourney:white`: 默认Midjourney 的价格:按需。价格按当前汇率动态计算。
是的,API 完全兼容 OpenAI。只需将 base_url 改为 https://getvibeapi.com/v1 并设置密钥——其余代码不变。