Edge Developer Platform
  • Pages
    • Product Introduction
    • Quick Start
      • Agent Development
      • Importing a Git Repository
      • Starting From a Template
      • Direct Upload
      • Start with AI
    • Framework Guide
      • Agent
      • Frontends
        • Vite
        • React
        • Vue
        • Hugo
        • Other Frameworks
      • Backends
      • Full-stack
        • Next.js
        • Nuxt
        • Astro
        • React Router
        • SvelteKit
        • TanStack Start
        • Vike
      • Custom 404 Page
    • Project Guide
      • Project Management
      • edgeone.json
      • Configuring Cache
      • Building Output Configuration
      • Domain Management
        • Overview
        • Custom Domain
        • HTTPS Configuration
          • Overview
          • Apply for Free Certificate
          • Using Managed SSL Certificate
        • Configure DNS CNAME Record
      • Error Codes
    • Build Guide
    • Deployment Guide
      • Overview
      • Create Deploys
      • Manage Deploys
      • Deploy Button
      • Using Github Actions
      • Using Gitlab CI/CD
      • Using CNB Plugin
      • Using IDE PlugIn
      • Using CodeBuddy IDE
    • Makers for Platforms
      • Platform and Multi-Tenancy
      • Vibe Coding Solution
      • Template Example
        • Vibe Coding General Template
        • Vibe Coding Platform Template
    • Observability
      • Overview
      • Metric Analysis
      • Log Analysis
    • Functions
      • Overview
      • Edge Functions
      • Cloud Functions
        • Overview
        • Node.js
        • Python
        • Go
    • Agents
      • Overview
      • Quick Start
      • Conversation Management
      • Observability
      • Sandbox Tool
        • Overview
        • Using the Agent Framework
        • Sandbox Atomic API
        • Network Search Tool
      • Agent Authentication
    • Models
      • Overview
      • Models and Vendors
        • Overview
        • Using the Zhuque Model
        • Using the Jev Model
        • Using Vendor Keys
          • OpenAI
          • Anthropic
          • Google AI Studio
          • DeepSeek
          • MiniMax
          • Hunyuan
          • Zhipu
          • MoonShot AI
      • FAQs
    • Storage
      • Overview
      • KV
      • Blob
    • Middleware
    • AI-Native Development
      • Skills
      • MCP
      • Plugin
    • Copilot
      • Overview
      • Quick Start
    • API Token
    • EdgeOne CLI
    • Makers SDK
      • Overview
      • Examples
        • Creating a Deployment
        • Deploying via the CLI
        • Project Management
      • Projects
        • Project Operations
        • Environment Variable
      • Deployment
    • Message Notification
    • Integration Guide
      • AI
        • Makers Models Integration
        • Large Models for Images Integration
      • Database
        • Supabase Integration
        • Pages KV Integration
      • Ecommerce
        • Shopify Integration
        • WooCommerce Integration
      • Payment
        • Stripe Integration
        • Integrating Paddle
      • CMS
        • WordPress Integration
        • Contentful Integration
        • Sanity Integration
        • Payload Integration
      • Authentication
        • Supabase Integration
        • Clerk Integration
      • IM
        • Overview
        • WeCom
        • Feishu
        • DingTalk
        • Telegram
        • slack
        • Discord
    • Best Practices
      • Adding an AI Chat Assistant to a Website
      • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
      • Building Agent Applications Quickly with Makers Agents
      • Building an Ecommerce Platform with Shopify
      • Building a SaaS Site Using Supabase and Stripe
      • Building a Company Brand Site Quickly
      • How to Quickly Build a Blog Site
      • Quick Launch via Login-Free Deployment in WorkBuddy
    • Migration Guides
      • Migrating from Vercel to EdgeOne Makers
      • Migrating from Cloudflare Pages to EdgeOne Makers
      • Migrating from Netlify to EdgeOne Makers
    • Troubleshooting
    • FAQs
    • Limits
    • Pricing
    • Contact Us
    • Release Notes

Creating a Deployment

Deploying with an API Token

Create a project and deploy artifacts using the Makers API Token. The artifact can be files, directory, or archive, and this example uses files. After a successful deploy call, deploymentId, projectId, and env are returned immediately.
Typescript
Python
import { Makers } from "@edgeone/makers-sdk";

const makers = new Makers({
token: process.env.MAKERS_API_TOKEN,
region: "china",
});

async function createDeployment() {
try {
const { projectId } = await makers.projects.create({
name: "my-site",
});

const deployment = await makers.deployments.deploy({
projectId,
artifact: { files: { "index.html": "<h1>Hello</h1>" } },
});

console.log(
`Deployment created: ${deployment.deploymentId} env ${deployment.env}`,
);
} catch (error) {
console.error(
error instanceof Error ? `Error: ${error.message}` : String(error),
);
}
}

createDeployment();
import os
from makers_sdk import Makers, MakersError

makers = Makers(
token=os.environ["MAKERS_API_TOKEN"],
region="china",
)

def create_deployment():
try:
created = makers.projects.create(name="my-site")


deployment = makers.deployments.deploy(
project_id=created["project_id"],
artifact={"files": {"index.html": "<h1>Hello</h1>"}},
)


print(
f"Deployment created: {deployment['deployment_id']} "
f"env {deployment['env']}"
)
except MakersError as error:
print(f"Error: {error}")

create_deployment()

Deploying with a Tenant Token

In deployment scenarios where platform-level credentials need to be isolated to reduce the risk of Makers API Token leakage, you can issue a tenant Token to complete the deployment.
Typescript
Python
import { Makers } from "@edgeone/makers-sdk";

const platform = new Makers({
token: process.env.MAKERS_API_TOKEN,
region: "china",
});

const { token, tokenId, expired } = await platform.tokens.create({
tenantId: "user-open-id",
name: "user-open-id",
expiresIn: 86400,
});

const user = new Makers({
token,
region: "china",
});

const { projectId } = await user.projects.create({ name: "my-site" });
await user.deployments.deploy({
projectId,
artifact: { files: { "index.html": "<h1>Hello</h1>" } },
});
import os

from makers_sdk import Makers

platform = Makers(
token=os.environ["MAKERS_API_TOKEN"],
region="china",
)

created = platform.tokens.create(
tenant_id="user-open-id",
name="user-open-id",
expires_in=86400,
)

user = Makers(
token=created["token"],
region="china",
)

project = user.projects.create(name="my-site")
user.deployments.deploy(
project_id=project["project_id"],
artifact={"files": {"index.html": "<h1>Hello</h1>"}},
)

Deploying and Waiting

Call wait after deploy. After the deployment succeeds, a preview link previewUrl is returned, which can be opened in a browser within its validity period.
Typescript
Python
import { Makers } from "@edgeone/makers-sdk";

const makers = new Makers({
token: process.env.MAKERS_API_TOKEN,
region: "china",
});

async function deployAndWait() {
try {
const { projectId } = await makers.projects.create({
name: "my-site",
});

const deployment = await makers.deployments.deploy({
projectId,
artifact: { files: { "index.html": "<h1>Hello</h1>" } },
});

const result = await makers.deployments.wait({
projectId,
deploymentId: deployment.deploymentId,
});

if (result.status === "Success") {
console.log(result.previewUrl);
} else {
console.error(result.status);
}
} catch (error) {
console.error(
error instanceof Error ? `Error: ${error.message}` : String(error),
);
}
}

deployAndWait();
import os
from makers_sdk import Makers, MakersError

makers = Makers(
token=os.environ["MAKERS_API_TOKEN"],
region="china",
)

def deploy_and_wait():
try:
created = makers.projects.create(name="my-site")
project_id = created["project_id"]

deployment = makers.deployments.deploy(
project_id=project_id,
artifact={"files": {"index.html": "<h1>Hello</h1>"}},
)

result = makers.deployments.wait(
project_id=project_id,
deployment_id=deployment["deployment_id"],
)

if result.get("status") == "Success":
print(result.get("preview_url"))
else:
print(result.get("status"))
except MakersError as error:
print(f"Error: {error}")

deploy_and_wait()
For more deployment methods, see Deployment.