Relace API
Access Relace instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.chat("Explain AI like I'm five!", {
model: "relace/relace-apply-3"
}).then(response => {
console.log(response);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain AI like I'm five!", {
model: "relace/relace-apply-3"
}).then(response => {
console.log(response);
});
</script>
</body>
</html>
List of Relace Models
Relace: Relace Apply 3
relace/relace-apply-3
Relace Apply 3 is a specialized code-patching model that merges AI-generated code edits into existing source files at up to 10,000 tokens per second. It supports a 256K context window and works with diffs from models like Claude and GPT-4, making code integration fast and reliable.
ChatRelace: Relace Search
relace/relace-search
Relace Search is an agentic codebase search model that uses 4-12 parallel tool calls (view_file, grep) to explore repositories and return relevant files. It performs multi-step reasoning to produce precise results 4x faster than frontier models, designed to work as a subagent for coding workflows.
Frequently Asked Questions
The Relace API gives you access to models for AI chat. Through Puter.js, you can start using Relace models instantly with zero setup or configuration.
Puter.js supports a variety of Relace models, including Relace: Relace Apply 3 and Relace: Relace Search. Find all AI models supported by Puter.js in the AI model list.
With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.
Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.
Yes — the Relace API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.