Makers Models Integration
Makers Models is a unified model access service deployed on EdgeOne edge nodes. With a gateway URL and an API Key, you can call multiple model providers and switch models by modifying the
model parameter, without adapting to each provider's authentication method separately in your business code. This document describes how to create an API Key, select a model, integrate code, and perform local debugging and deployment.Quick Start
1. Selecting a Project Type
Project Type | Key and Configuration Source |
Agent project | Automatically configure model gateway variables during deployment. |
Web project | Manually create an API Key in the Models console. |
markdown
To build an Agent project, we recommend starting with OpenAI Agents Starter. Click
Deploy, connect your Git platform, and create a project. The platform then completes the build and deployment, so you do not need to manually create a Models API Key.2. Selecting a Model Source
markdown
Makers Models provides two model sources, but applications always use the Models API Key for authentication. Bound third-party provider keys are encrypted and hosted by the platform, so you do not need to write them into your business code.
Dimension | Built-in Model | Self-Funded Vendor Model (BYOK) |
Preliminary Preparation | No vendor Key binding required | Bind the corresponding vendor API Key in the console. |
Model ID | @makers/<model> | <provider>/<model> |
Billing | Uses limited quota provided by Makers | Fees are charged to the developer's vendor account. |
Scenarios | Demo, teaching, prototyping, and technical verification | Production environments and specified commercial models |
markdown
For details on built-in models and self-funded provider models, refer to Model and Provider Overview.
3. Configuring Environment Variables
markdown
Go to the Makers console and choose
Models → API Key to create a Key. Create and securely store your Makers Models API Key:MAKERS_MODELS_KEY=your-api-key-here
markdown
Applications use the Makers Models API Key to access models. If you later integrate self-funded provider models, you only need to bind the provider API Key to the console. It is encrypted and hosted by the platform and should not be written into business code.
markdown Security note: API keys can only be stored in server-side environment variables. Do not write them into frontend code or logs, or commit them to Git repositories.
Calling Models
markdown
The following example uses the built-in model
@makers/deepseek-v4-flash. To call other models, simply replace the model parameter.import { createAiGateway } from "@edgeone/makers-models-provider";import { generateText } from "ai";const aiGateway = createAiGateway({apiKey: process.env.MAKERS_MODELS_KEY,});const { text } = await generateText({model: aiGateway("@makers/deepseek-v4-flash"),prompt: "What can you do?",});
import OpenAI from "openai";const client = new OpenAI({apiKey: process.env.MAKERS_MODELS_KEY,baseURL: "https://ai-gateway.edgeone.link/v1",});const completion = await client.chat.completions.create({model: "@makers/deepseek-v4-flash",messages: [{ role: "user", content: "What can you do?" }],});
import osfrom openai import OpenAIclient = OpenAI(api_key=os.getenv("MAKERS_MODELS_KEY"),base_url="https://ai-gateway.edgeone.link/v1",)completion = client.chat.completions.create(model="@makers/deepseek-v4-flash",messages=[{"role": "user", "content": "What can you do?"}],)
curl -X POST "https://ai-gateway.edgeone.link/v1/chat/completions" \--header "Authorization: Bearer $MAKERS_MODELS_KEY" \--header "Content-Type: application/json" \--data '{"model": "@makers/deepseek-v4-flash","stream": true,"messages": [{"role": "user", "content": "What can you do?"}]}'
Switching Models
Switching Built-in Models
markdown
Built-in model IDs start with
@makers/. To switch models, you only need to modify the model ID:const model = aiGateway("@makers/kimi-k2.6");
markdown
The model list may be updated. We recommend that you copy the complete and currently available model ID from the console or Model and Provider Overview.
Switching to Self-paid Vendor Models
1. markdown
Go to the
Models page in the Makers console.2. markdown
Select a model provider and bind its API Key.
3. markdown
Change
model to <provider>/<model>, for example, anthropic/claude-sonnet-5.4. markdown
Keep the Makers Models gateway Key and Base URL unchanged.
5. markdown
Redeploy after updating the environment variables or code.
markdown Note: The provider API Key is used by the Makers gateway to send requests to the provider. The application itself still uses the Makers Models gateway Key. The availability scope, regional restrictions, quotas, and billing rules of the provider's models are subject to the corresponding provider account.
Local Debugging and Deployment
1. Starting the Local Development Service
markdown
After installing EdgeOne CLI, you can start and debug the project locally. If you need to use the environment variables configured in the Makers console, run
edgeone makers link first to link an existing project.edgeone makers dev
markdown
The default access URL is
http://localhost:8088/. For Agent projects, you can also access the local observability tracing page at http://localhost:8088/agent-metrics.2. Deploying a Project
markdown
If your project is connected to a Git repository, pushing code triggers the CI build and deployment in Makers. You can also deploy directly through the CLI:
markdown # Deploy to Productionedgeone makers deploy
