Codebase Platform API

The Platform API from Codebase — 5 operation(s) for platform.

GitHub OpenAPI

Operations 5

POST /api/v1/enhance-prompt Enhance a build prompt #
GET /api/v1/models List available AI models #
GET /api/v1/providers List registered LLM providers #
POST /api/v1/search Search the public web #
GET /api/v1/whoami Introspect current identity #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codebase-design:codebase-design-platform-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codebase-design-platform-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codebase Design Platform API
  version: 1.0.0
  contact:
    email: admin@aipowergrid.io
  description: 'Operations tagged Platform across 2 of this provider''s published API definitions: codebase-design-openapi.json, codebase-design-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:3001
  description: Current
- url: https://dev.codebase.design
  description: Development
- url: https://staging.codebase.design
  description: Staging
- url: https://codebase.design
  description: Production
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Platform
paths:
  /api/v1/enhance-prompt:
    post:
      summary: Enhance a build prompt
      description: Takes a short user prompt and returns an expanded, more descriptive version that produces better build outputs. Uses a cheap model internally.
      tags:
      - Platform
      security:
      - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - prompt
              properties:
                prompt:
                  type: string
                  minLength: 3
                  description: Short build description to enhance
      responses:
        '200':
          description: Enhanced prompt
          content:
            application/json:
              schema:
                type: object
                properties:
                  enhanced:
                    type: string
                    description: Expanded prompt
                  original:
                    type: string
                    description: Original input
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          description: Internal error
        '502':
          description: All LLM providers failed
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// Auth: X-API-Key header.\nconst apiKey = process.env.CODEBASE_API_KEY!;\n\nconst res = await fetch('https://codebase.design/api/v1/enhance-prompt', {\n  method: 'POST',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"prompt\": \"string\"\n  })\n});\n\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();\nconsole.log(data);"
      - lang: Python
        label: Python
        source: "import os\nimport requests\n\napi_key = os.environ['CODEBASE_API_KEY']\n\nresponse = requests.post(\n    'https://codebase.design/api/v1/enhance-prompt',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    },\n    json={\n        \"prompt\": \"string\"\n    }\n)\nresponse.raise_for_status()\nprint(response.json())"
      - lang: Rust
        label: Rust
        source: "// Cargo.toml:\n//   reqwest    = { version = \"0.12\", features = [\"json\"] }\n//   serde_json = \"1\"\n//   tokio      = { version = \"1\", features = [\"full\"] }\n\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let api_key = env::var(\"CODEBASE_API_KEY\")?;\n    let client = reqwest::Client::new();\n\n    let res = client\n        .post(\"https://codebase.design/api/v1/enhance-prompt\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .json(&serde_json::json!({\n            \"prompt\": \"string\"\n        }))\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: postApiV1EnhancePrompt
      x-operation-id-source: derived
    servers:
    - url: http://localhost:3001
      description: Current
    - url: http://localhost:3001
      description: Local development
    - url: https://dev.codebase.design
      description: Development
    - url: https://staging.codebase.design
      description: Staging
    - url: https://codebase.design
      description: Production
  /api/v1/models:
    get:
      summary: List available AI models
      description: Returns all registered LLM models grouped by provider, including availability.
      tags:
      - Platform
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Model list
          content:
            application/json:
              schema:
                type: object
                properties:
                  models:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        provider:
                          type: string
                        available:
                          type: boolean
                  groupedModels:
                    type: object
                  defaultModel:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          description: Internal server error
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// Auth: X-API-Key header.\nconst apiKey = process.env.CODEBASE_API_KEY!;\n\nconst res = await fetch('https://codebase.design/api/v1/models', {\n  method: 'GET',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  }\n});\n\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();\nconsole.log(data);"
      - lang: Python
        label: Python
        source: "import os\nimport requests\n\napi_key = os.environ['CODEBASE_API_KEY']\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/models',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    }\n)\nresponse.raise_for_status()\nprint(response.json())"
      - lang: Rust
        label: Rust
        source: "// Cargo.toml:\n//   reqwest    = { version = \"0.12\", features = [\"json\"] }\n//   serde_json = \"1\"\n//   tokio      = { version = \"1\", features = [\"full\"] }\n\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let api_key = env::var(\"CODEBASE_API_KEY\")?;\n    let client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/models\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: getApiV1Models
      x-operation-id-source: derived
    servers:
    - url: http://localhost:3001
      description: Current
    - url: http://localhost:3001
      description: Local development
    - url: https://dev.codebase.design
      description: Development
    - url: https://staging.codebase.design
      description: Staging
    - url: https://codebase.design
      description: Production
  /api/v1/providers:
    get:
      summary: List registered LLM providers
      tags:
      - Platform
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Provider list
          content:
            application/json:
              schema:
                type: object
                properties:
                  providers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        available:
                          type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          description: Internal server error
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// Auth: X-API-Key header.\nconst apiKey = process.env.CODEBASE_API_KEY!;\n\nconst res = await fetch('https://codebase.design/api/v1/providers', {\n  method: 'GET',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  }\n});\n\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();\nconsole.log(data);"
      - lang: Python
        label: Python
        source: "import os\nimport requests\n\napi_key = os.environ['CODEBASE_API_KEY']\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/providers',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    }\n)\nresponse.raise_for_status()\nprint(response.json())"
      - lang: Rust
        label: Rust
        source: "// Cargo.toml:\n//   reqwest    = { version = \"0.12\", features = [\"json\"] }\n//   serde_json = \"1\"\n//   tokio      = { version = \"1\", features = [\"full\"] }\n\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let api_key = env::var(\"CODEBASE_API_KEY\")?;\n    let client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/providers\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: getApiV1Providers
      x-operation-id-source: derived
    servers:
    - url: http://localhost:3001
      description: Current
    - url: http://localhost:3001
      description: Local development
    - url: https://dev.codebase.design
      description: Development
    - url: https://staging.codebase.design
      description: Staging
    - url: https://codebase.design
      description: Production
  /api/v1/search:
    post:
      summary: Search the public web
      description: Authenticated search for Codebase agents. Returns source URLs and snippets from the configured search provider.
      tags:
      - Platform
      security:
      - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - query
              properties:
                query:
                  type: string
                  minLength: 1
                  maxLength: 500
                max_results:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 5
      responses:
        '200':
          description: Search results
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          description: Search provider failed
        '503':
          description: Search is not configured
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// Auth: X-API-Key header.\nconst apiKey = process.env.CODEBASE_API_KEY!;\n\nconst res = await fetch('https://codebase.design/api/v1/search', {\n  method: 'POST',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"query\": \"string\",\n    \"max_results\": 5\n  })\n});\n\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();\nconsole.log(data);"
      - lang: Python
        label: Python
        source: "import os\nimport requests\n\napi_key = os.environ['CODEBASE_API_KEY']\n\nresponse = requests.post(\n    'https://codebase.design/api/v1/search',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    },\n    json={\n        \"query\": \"string\",\n        \"max_results\": 5\n    }\n)\nresponse.raise_for_status()\nprint(response.json())"
      - lang: Rust
        label: Rust
        source: "// Cargo.toml:\n//   reqwest    = { version = \"0.12\", features = [\"json\"] }\n//   serde_json = \"1\"\n//   tokio      = { version = \"1\", features = [\"full\"] }\n\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let api_key = env::var(\"CODEBASE_API_KEY\")?;\n    let client = reqwest::Client::new();\n\n    let res = client\n        .post(\"https://codebase.design/api/v1/search\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .json(&serde_json::json!({\n            \"query\": \"string\",\n            \"max_results\": 5\n        }))\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: postApiV1Search
      x-operation-id-source: derived
    servers:
    - url: http://localhost:3001
      description: Current
    - url: http://localhost:3001
      description: Local development
    - url: https://dev.codebase.design
      description: Development
    - url: https://staging.codebase.design
      description: Staging
    - url: https://codebase.design
      description: Production
  /api/v1/whoami:
    get:
      summary: Introspect current identity
      description: Returns the authenticated user's ID, granted scopes, key metadata, and rate limit tier. Useful for verifying API key configuration.
      tags:
      - Platform
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Current identity
          content:
            application/json:
              schema:
                type: object
                properties:
                  userId:
                    type: string
                  scopes:
                    type: array
                    items:
                      type: string
                  keyPrefix:
                    type: string
                    nullable: true
                    description: First 16 chars of the key (null for static keys)
                  environment:
                    type: string
                    enum:
                    - live
                    - test
                  expiresAt:
                    type: integer
                    nullable: true
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// Auth: X-API-Key header.\nconst apiKey = process.env.CODEBASE_API_KEY!;\n\nconst res = await fetch('https://codebase.design/api/v1/whoami', {\n  method: 'GET',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  }\n});\n\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();\nconsole.log(data);"
      - lang: Python
        label: Python
        source: "import os\nimport requests\n\napi_key = os.environ['CODEBASE_API_KEY']\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/whoami',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    }\n)\nresponse.raise_for_status()\nprint(response.json())"
      - lang: Rust
        label: Rust
        source: "// Cargo.toml:\n//   reqwest    = { version = \"0.12\", features = [\"json\"] }\n//   serde_json = \"1\"\n//   tokio      = { version = \"1\", features = [\"full\"] }\n\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let api_key = env::var(\"CODEBASE_API_KEY\")?;\n    let client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/whoami\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: getApiV1Whoami
      x-operation-id-source: derived
    servers:
    - url: http://localhost:3001
      description: Current
    - url: http://localhost:3001
      description: Local development
    - url: https://dev.codebase.design
      description: Development
    - url: https://staging.codebase.design
      description: Staging
    - url: https://codebase.design
      description: Production
components:
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    RateLimited:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    Forbidden:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Revocable API key (cb_live_... or cb_test_...)
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token
x-refined-from:
- codebase-design-openapi.json
- codebase-design-openapi.yml