The KnowCode API provides programmatic access to the entire platform — from AI code generation to deployment on Base. It is RESTful, secure, and optimized for integration with SDKs, CI/CD pipelines, and enterprise applications.
Base URL
https://api.kno.codes/v1
Authentication
Every request must include an API key in the header:
Authorization:Bearer YOUR_API_KEY
Rate Limits
100 requests per minute per API key.
Exceeding limits returns a 429 error.
5.1 Endpoints
5.1.1 Generate Code
POST/generate-code
Converts a design screenshot or URL into production-ready code.
POST/deploy
Registers a domain and deploys code to IPFS + Base.
Request Body
Response
5.1.3 Preview Project
GET/preview/{project_id}
Returns a live preview of a generated project.
Response
5.1.4 List Projects
GET/projects
Fetches all projects linked to the authenticated API key.
Response
5.1.5 Project Details
GET/projects/{id}
Returns full metadata, deployment details, and preview links for a project.
Response
5.2 Error Handling
Errors are returned in a consistent JSON structure:
Common Error Codes
INVALID_INPUT – Missing or invalid parameters.
UNAUTHORIZED – Invalid or missing API key.
RATE_LIMIT_EXCEEDED – Too many requests.
DEPLOYMENT_FAILED – On-chain deployment error.
5.3 Best Practices
Always validate design_url before calling /generate-code.
Use /preview before committing to full deployment.
Securely store and rotate API keys.
Implement retries with exponential backoff for production-grade reliability.
The KnowCode API is more than a developer utility — it’s a programmable infrastructure layer for AI-driven Web3 applications. It allows builders to automate the full lifecycle from design → code → deployment, while providing investors with confidence that KnowCode is built to scale across teams, enterprises, and ecosystems.