Codebase Prompts API

The Prompts API from Codebase — 6 operation(s) for prompts.

GitHub OpenAPI

Operations 6

GET /api/v1/prompts/health Prompts Convex health probe #
GET /api/v1/prompts/shared/stats Live aggregate counts for the shared catalog #
GET /api/v1/prompts/shared Paginated shared catalog #
GET /api/v1/prompts/shared/sample Small sample for suggestion chips #
GET /api/v1/prompts/me User's prompt library #
POST /api/v1/prompts Create a prompt #

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-prompts-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-prompts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codebase Design Prompts API
  version: 1.0.0
  contact:
    email: admin@aipowergrid.io
  description: 'Operations tagged Prompts 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: Prompts
paths:
  /api/v1/prompts/health:
    get:
      summary: Prompts Convex health probe
      tags:
      - Prompts
      security: []
      responses:
        '200':
          description: Health status
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                  backend:
                    type: string
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// No authentication required.\n\nconst res = await fetch('https://codebase.design/api/v1/prompts/health', {\n  method: 'GET',\n  headers: {\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\n# No authentication required.\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/prompts/health',\n    headers={\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 client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/prompts/health\")\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: getApiV1PromptsHealth
      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/prompts/shared/stats:
    get:
      summary: Live aggregate counts for the shared catalog
      description: Total prompt count and per-tag counts. Computed live from `prompt_stat`; **never** a precomputed snapshot. Returns the real total — no 500-row cap.
      tags:
      - Prompts
      security: []
      parameters:
      - in: query
        name: scope
        schema:
          type: string
          enum:
          - system
          - public
        description: Aggregation scope. Defaults to `system`.
      responses:
        '200':
          description: Stats payload
          content:
            application/json:
              schema:
                type: object
                properties:
                  totalPrompts:
                    type: integer
                  counts:
                    type: array
                    items:
                      type: object
                      properties:
                        tag:
                          type: string
                        count:
                          type: integer
                  computedAt:
                    type: integer
                  live:
                    type: boolean
        '503':
          description: Prompts module disabled
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// No authentication required.\n\nconst res = await fetch('https://codebase.design/api/v1/prompts/shared/stats?scope=system', {\n  method: 'GET',\n  headers: {\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\n# No authentication required.\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/prompts/shared/stats?scope=system',\n    headers={\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 client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/prompts/shared/stats?scope=system\")\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: getApiV1PromptsSharedStats
      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/prompts/shared:
    get:
      summary: Paginated shared catalog
      tags:
      - Prompts
      security: []
      parameters:
      - in: query
        name: query
        schema:
          type: string
      - in: query
        name: tag
        schema:
          type: string
      - in: query
        name: cursor
        schema:
          type: string
      - in: query
        name: limit
        schema:
          type: integer
          minimum: 1
          maximum: 200
      responses:
        '200':
          description: Page of shared prompts
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// No authentication required.\n\nconst res = await fetch('https://codebase.design/api/v1/prompts/shared?query=YOUR_QUERY&tag=YOUR_TAG&cursor=YOUR_CURSOR&limit=YOUR_LIMIT', {\n  method: 'GET',\n  headers: {\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\n# No authentication required.\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/prompts/shared?query=YOUR_QUERY&tag=YOUR_TAG&cursor=YOUR_CURSOR&limit=YOUR_LIMIT',\n    headers={\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 client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/prompts/shared?query=YOUR_QUERY&tag=YOUR_TAG&cursor=YOUR_CURSOR&limit=YOUR_LIMIT\")\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: getApiV1PromptsShared
      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/prompts/shared/sample:
    get:
      summary: Small sample for suggestion chips
      tags:
      - Prompts
      security: []
      parameters:
      - in: query
        name: count
        schema:
          type: integer
          minimum: 1
          maximum: 50
      responses:
        '200':
          description: Sample list
      x-codeSamples:
      - lang: TypeScript
        label: TypeScript
        source: "// No authentication required.\n\nconst res = await fetch('https://codebase.design/api/v1/prompts/shared/sample?count=YOUR_COUNT', {\n  method: 'GET',\n  headers: {\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\n# No authentication required.\n\nresponse = requests.get(\n    'https://codebase.design/api/v1/prompts/shared/sample?count=YOUR_COUNT',\n    headers={\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 client = reqwest::Client::new();\n\n    let res = client\n        .get(\"https://codebase.design/api/v1/prompts/shared/sample?count=YOUR_COUNT\")\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: getApiV1PromptsSharedSample
      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/prompts/me:
    get:
      summary: User's prompt library
      tags:
      - Prompts
      description: Identity is derived from the authenticated session, bearer token, or API key.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      parameters:
      - in: query
        name: tag
        schema:
          type: string
      - in: query
        name: limit
        schema:
          type: integer
      responses:
        '200':
          description: User prompts
      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/prompts/me?tag=YOUR_TAG&limit=YOUR_LIMIT', {\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/prompts/me?tag=YOUR_TAG&limit=YOUR_LIMIT',\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/prompts/me?tag=YOUR_TAG&limit=YOUR_LIMIT\")\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: getApiV1PromptsMe
      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/prompts:
    post:
      summary: Create a prompt
      tags:
      - Prompts
      description: Ownership is derived from the authenticated session, bearer token, or API key.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - title
              - content
              - visibility
              properties:
                title:
                  type: string
                content:
                  type: string
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                visibility:
                  type: string
                  enum:
                  - private
                  - public
      responses:
        '200':
          description: Created
      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/prompts', {\n  method: 'POST',\n  headers: {\n    'X-API-Key': apiKey,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"title\": \"string\",\n    \"content\": \"string\",\n    \"description\": \"string\",\n    \"tags\": [\n      \"string\"\n    ],\n    \"visibility\": \"private\"\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/prompts',\n    headers={\n        'X-API-Key': api_key,\n        'Content-Type': 'application/json',\n    },\n    json={\n        \"title\": \"string\",\n        \"content\": \"string\",\n        \"description\": \"string\",\n        \"tags\": [\n            \"string\"\n        ],\n        \"visibility\": \"private\"\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/prompts\")\n        .header(\"X-API-Key\", api_key)\n        .header(\"Content-Type\", \"application/json\")\n        .json(&serde_json::json!({\n            \"title\": \"string\",\n            \"content\": \"string\",\n            \"description\": \"string\",\n            \"tags\": [\n                \"string\"\n            ],\n            \"visibility\": \"private\"\n        }))\n        .send()\n        .await?;\n\n    let data: serde_json::Value = res.json().await?;\n    println!(\"{:#?}\", data);\n    Ok(())\n}"
      operationId: postApiV1Prompts
      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:
  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