Muse Image

v0.1.3
io.github.kevintsai1202/muse-image Checked 4 days ago Published 2 months ago

Generate, edit and iteratively refine images with Meta Muse, returning file paths not base64.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_image Muse 文字生圖

以 Meta Muse 模型從文字描述生成圖片。圖片會存到本機並回傳絕對路徑(不回傳圖片內容本身,需要看圖請用檔案讀取工具開啟該路徑)。size 參數是長寬比而非精確像素解析度。每張圖片成本 US$0.01。

ParameterTypeDescription
prompt *string圖片描述,英文通常效果較佳
extra_paramsobject傳給 API 的額外參數(物件),用於新模型的特殊參數。會與伺服器全域設定合併,單次設定優先。與請求核心欄位(model、prompt、response_format 等)衝突…
filename_prefixstring輸出檔名前綴,預設 muse
modelstring模型 ID,省略則使用伺服器設定的預設模型
ninteger生成張數,1 到 10,預設 1
output_formatstring輸出格式,預設 png
reasoning_strengthstring推理強度,預設 high(品質較佳但較慢)
sizestring長寬比字串,例如 "1792x1024"、"1024x1536"。注意:這是長寬比而非精確像素解析度

edit_image Muse 依圖改圖

以 Meta Muse 模型依既有圖片與指令生成新圖。images 可填本機檔案路徑或 http(s) 網址,本機檔案會自動轉成 base64,呼叫端不需自行處理。結果存到本機並回傳絕對路徑。每張圖片成本 US$0.01。

ParameterTypeDescription
images *array參考圖片,可為本機檔案路徑(png/jpg/jpeg/webp/gif)或 http(s) 網址
prompt *string修改指令,描述你要如何改這張圖
extra_paramsobject傳給 API 的額外參數(物件),用於新模型的特殊參數。會與伺服器全域設定合併,單次設定優先。與請求核心欄位(model、prompt、response_format 等)衝突…
filename_prefixstring輸出檔名前綴,預設 muse-edit
modelstring模型 ID,省略則使用伺服器設定的預設模型
ninteger生成張數,1 到 10,預設 1
output_formatstring輸出格式,預設 png
reasoning_strengthstring推理強度,預設 high(品質較佳但較慢)
sizestring長寬比字串,例如 "1792x1024"、"1024x1536"。注意:這是長寬比而非精確像素解析度

iterate_image Muse 對話式迭代修圖

以對話方式多輪迭代修改圖片。回傳中一定包含 response_id;下一輪修改時把它填入 previous_response_id 即可延續同一段對話,本 server 不保存任何對話狀態。每張圖片成本 US$0.01。

ParameterTypeDescription
prompt *string本輪的修改指令
extra_paramsobject傳給 API 的額外參數(物件),用於新模型的特殊參數。會與伺服器全域設定合併,單次設定優先。與請求核心欄位(model、prompt、response_format 等)衝突…
filename_prefixstring輸出檔名前綴,預設 muse-iter
imagesarray首輪參考圖,本機路徑或 http(s) 網址
modelstring模型 ID,省略則使用伺服器設定的預設模型
output_formatstring輸出格式,省略時 Meta 端預設輸出 webp
previous_response_idstring上一輪回傳的 response_id;省略代表開始一段新對話
reasoning_strengthstring推理強度,預設 high
sizestring長寬比字串,例如 "1792x1024"、"1024x1536"。注意:這是長寬比而非精確像素解析度