API Documentation
Welcome to the TerraClaw API. This RESTful API allows you to programmatically manage projects, scenes, and exports.
Base URL: https://api.terraclaw.io/v1
Rate Limit: 100 requests per minute for Pro users
Introduction
The TerraClaw API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Authentication
Authentication to the TerraClaw API is performed using Bearer tokens. You can generate API keys from your Account Settings.
Exchange credentials for an access token.
curl -X POST https://api.terraclaw.io/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "your-password"}'
Projects
Projects are containers for your urban modeling work. Each project can contain multiple scenes.
List all projects for the authenticated user.
curl https://api.terraclaw.io/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY"
Create a new project.
curl -X POST https://api.terraclaw.io/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Berlin Development", "location": {"lat": 52.52, "lng": 13.405}}'
Scenes
Scenes represent individual 3D modeling environments within a project.
List all scenes in a project.
Create a new scene in a project.
Exports
Export your scenes to various formats for use in BIM and CAD software.
Request an export of a scene in the specified format.
curl -X POST https://api.terraclaw.io/v1/exports/request \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sceneId": "scene_123", "format": "ifc"}'
Supported Formats
- IFC - Industry Foundation Classes for BIM workflows
- FBX - Filmbox for visualization and Unreal Engine
- GLB - GL Binary for web and AR applications
Urban Intelligence
Pro
AI-powered analysis and generation endpoints for urban planning.
Analyze a site's urban grain and context compatibility.
Generate AI-powered massing proposals based on site constraints.
Errors
The TerraClaw API uses standard HTTP response codes to indicate the success or failure of requests.
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Need Help?
For API support, contact us at api@terraclaw.io or visit our Help Center.