Resources
API Reference
Integrate Kiku's context-aware intelligence into your tools, CI/CD pipelines, and custom workflows via our REST API.
Authentication
All API requests require a Bearer token. Generate API keys from your dashboard under Settings > API Keys. Include the key in the Authorization header:
Authorization: Bearer kiku_sk_live_abc123...
Base URL: https://api.kiku.jishulabs.com
Rate Limits
| Plan | Completions | Analysis | Indexing |
|---|---|---|---|
| Starter | 1,000/day | 100/day | 5/day |
| Pro | Unlimited | 5,000/day | 100/day |
| Team | Unlimited | Unlimited | Unlimited |
Endpoints
POST
/v1/completionsGenerate context-aware code completions
Request Body
{
"project_id": "proj_abc123",
"file_path": "src/services/billing.ts",
"cursor_position": { "line": 42, "column": 8 },
"context": {
"prefix": "function calculateDiscount(",
"suffix": ") {\n // ...\n}",
"related_files": ["src/types/billing.ts"]
},
"max_suggestions": 3
}Response
{
"suggestions": [
{
"text": "customer: Customer, plan: Plan",
"confidence": 0.94,
"source": "pattern:billing-service"
}
],
"context_used": ["kioku:arch-decision-42", "kozo:param-pattern"]
}POST
/v1/analyzeAnalyze code for pattern compliance and security issues
Request Body
{
"project_id": "proj_abc123",
"file_path": "src/api/routes.ts",
"content": "// file content here",
"checks": ["patterns", "security", "debt"]
}Response
{
"issues": [
{
"type": "security",
"severity": "high",
"line": 15,
"message": "SQL query built with string concatenation",
"suggestion": "Use parameterized queries"
}
],
"pattern_score": 0.87
}GET
/v1/projects/:id/patternsRetrieve detected patterns for a project
Response
{
"patterns": [
{
"id": "pat_001",
"type": "naming",
"description": "Service classes use PascalCase with Service suffix",
"examples": ["UserService", "BillingService"],
"confidence": 0.96
},
{
"id": "pat_002",
"type": "structure",
"description": "API routes follow /v1/resource/:id convention",
"confidence": 0.91
}
]
}POST
/v1/projects/:id/indexTrigger re-indexing of a project
Request Body
{
"full_reindex": false,
"paths": ["src/"]
}Response
{
"job_id": "idx_xyz789",
"status": "queued",
"estimated_seconds": 45
}