🔥 Black Friday AI API deals are live· 🎬 Seedance 2.5 — 20% off, up to 42% below market, until Nov 30Ends in--d --:--:--See deals →

Muapi Sandbox Write File: AI Large Language Models

Write files into a cloud Linux sandbox with the Muapi Sandbox API. Seed workspaces for agents. Pay per second, no subscription. Write a text file into a running sandbox at a path you choose.

Điều khiển mô hình tương tác

Write a text file into a running sandbox at a path you choose.

📝

Tổng quan

Về mô hình này

Write File on the Muapi Sandbox API writes a text file into a running sandbox at the given path. It is one operation of the Sandbox API, which gives AI agents and developers isolated cloud Linux machines over REST, billed per second from the same Muapi key and credits used for 500+ image, video and audio models. The response returns the path that was written. Sandboxes cost $0.036 (small), $0.072 (default) or $0.144 (large) per running hour, stopped sandboxes are free, and idle sandboxes auto-stop after 15 minutes. Pair it with Run Command and Stop Sandbox to build a complete agent workflow.

1Code generation: Write an agent's generated files before running them.
2Config injection: Place settings or scripts into a fresh sandbox.
3Project setup: Seed a workspace before running a build.
💰

Giá cả & Giá trị

Phân tích chi phí

muapiFrom $0.036 per running hour

Small $0.036, default $0.072, large $0.144 per hour. Billed per second from the same credits as media models. Stopped sandboxes are free.

Fal.aiKhông khả dụng

No sandbox API.

ReplicateKhông khả dụng

No sandbox API.

** Giá của đối thủ cạnh tranh được ước tính dựa trên kiến ​​trúc mô hình và cấp độ sử dụng tương tự.

⚙️

Chi tiết kỹ thuật

Lược đồ cấu hình

Sandbox IDstring

The sandbox ID returned by Create Sandbox.

Giá trị mặc định3f2b8c1e-5a4d-4e6f-9a7b-0c1d2e3f4a5b
pathstring

Absolute path of the file to write inside the sandbox.

Giá trị mặc định/home/user/workspace/app.py
contentstring

Text content to write to the file.

Giá trị mặc địnhprint('hello from the sandbox')
📖

Hướng dẫn thực hiện

Tài liệu dành cho nhà phát triển

How to Use Write File

  1. Get an API key: create one at muapi.ai/access-keys and export it as MUAPI_KEY.

  2. Call the endpoint: send the request below. Replace $SANDBOX_ID with the ID returned by Create Sandbox.

curl -X PUT "https://api.muapi.ai/api/v1/sandboxes/$SANDBOX_ID/files" \
  -H "x-api-key: $MUAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path": "/home/user/workspace/app.py", "content": "print(1)"}'
  1. Read the result: the response contains the path that was written.

  2. Stop when finished: call Stop Sandbox so you only pay for active time.

❓

Câu hỏi thường gặp

Thường xuyên hỏi

What does Write File do?

It writes a text file into a running sandbox at the given path.

How much do sandboxes cost?

$0.036 (small, 2 vCPU/4 GB), $0.072 (default, 4 vCPU/8 GB) or $0.144 (large, 8 vCPU/16 GB) per running hour, billed per second from your Muapi credits. Stopped sandboxes are free, and you need a $1 balance to start one.

Do I need a separate key for sandboxes?

No. The same Muapi API key and credit balance cover sandboxes and 500+ image, video and audio models.

What happens when my credits run out or the sandbox is idle?

The sandbox is stopped automatically when your balance cannot cover usage or after 15 minutes without activity. A stopped sandbox's files are kept for 14 days.

How is this operation authenticated?

Send your key in the `x-api-key` header. Each key can only see and control its own sandboxes.