Let your agent pick the models.
Every model on Codels has a machine-readable twin. No API key needed, CORS enabled, stable URLs. Press Copy for AI agent on a model page, or point your agent at https://codels.download/llms.txt and let it search on its own.
What “Copy for AI agent” puts on your clipboard
Add the 3D model "Pine Tree" from the Codels library to this three.js project.
1. First read the agent page (preview image, size, parts and ready-to-use code):
https://codels.download/m/pine-tree.md?snow=true
2. Then integrate it:
- Preferred: ES module https://codels.download/m/pine-tree.js?snow=true — exports createPineTree(): THREE.Group …
- Or the binary glTF: https://codels.download/m/pine-tree.glb?snow=true
- React Three Fiber component: https://codels.download/m/pine-tree.jsx?snow=true
Conventions: meters, +Y up, front faces +Z, origin at the center of the base (y = 0).Floating models (pickups, planets) are centered on the origin and wall-mounted props have their back on the plane z = 0 — every agent page states the exact origin.
MCP server
Connect Codels to Claude Code, Cursor, Windsurf or any MCP client. Your agent gets six tools: search_models, get_model (returns a 4-view preview image the agent can actually see), get_model_code, list_packs, get_pack and list_categories.
claude mcp add --transport http codels https://codels.download/mcpOther clients (e.g. Cursor mcp.json):
{
"mcpServers": {
"codels": {
"url": "https://codels.download/mcp"
}
}
}Endpoints
/m/<slug>.mdAgent page: description, preview image, size, parts table, parameters and the full three.js code — one fetch has everything.
/m/<slug>.jsES module exporting create<Name>(): THREE.Group. Zero dependencies besides three.
/m/<slug>.jsxReact Three Fiber component.
/m/<slug>.instanced.jsInstancing module: bake<Name>() (one geometry per material) + create<Name>Instances(count, place) — hundreds of copies in a few draw calls.
/m/<slug>.htmlStandalone runnable demo page (three.js from CDN).
/m/<slug>.png · .sheet.pngPreview render / 4-view sheet (3/4, front, side, top) so agents can “see” the model.
/m/<slug>.glb · .gltf · .obj · .stl · .jsonBinary/JSON glTF, OBJ with vertex colors, STL, raw CodelSpec.
/api/v1/models?q=&category=&tags=&sort=Search with facets. Returns URLs for every result.
/api/v1/models/<slug> · /api/v1/tags · /api/v1/categoriesMetadata, tag lookup with counts, category tree.
/c/<pack>.md · .js · .zip · .jsonPacks & public collections: agent overview, one ES module with every model, or a ZIP of GLBs + modules.
/llms.txtMachine-readable guide to this site.
/mcpModel Context Protocol endpoint (Streamable HTTP) with search, preview and code tools.
Parametric variants
Parametric models accept their parameters as query strings on every URL. The .md page lists each parameter with its range.
// fetch a taller pine with snow caps as a ready ES module
const src = await fetch('https://codels.download/m/pine-tree.js?height=5.5&snow=true').then((r) => r.text());Use the code
import * as THREE from 'three';
import { createPineTree } from './pine-tree.js';
const forest = new THREE.Group();
for (let i = 0; i < 40; i++) {
const tree = createPineTree();
tree.position.set((Math.random() - 0.5) * 60, 0, (Math.random() - 0.5) * 60);
tree.rotation.y = Math.random() * Math.PI * 2;
tree.scale.setScalar(0.8 + Math.random() * 0.5);
forest.add(tree);
}
scene.add(forest);Search from code
const res = await fetch('https://codels.download/api/v1/models?q=medieval+barrel&sort=relevance');
const { items } = await res.json();
console.log(items[0].urls.code); // → https://codels.download/m/<slug>.jsRate limits & API keys
Everything works without a key (120 API requests per minute per IP). For heavier use, create a free API key: 1,200 requests per minute and usage statistics. Send it as Authorization: Bearer cdl_… — responses carry X-RateLimit-Remaining, and a 429 tells you when to retry.
curl -H "Authorization: Bearer cdl_your_key" "https://codels.download/api/v1/models?q=barrel"
claude mcp add --transport http codels https://codels.download/mcp --header "Authorization: Bearer cdl_your_key"