> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmide.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get prompt by deployment ID

> Retrieves the current active version's prompt metadata (title, description, LLM configuration, and message list) by deployment ID, along with associated deployment and workspace information



## OpenAPI

````yaml api-reference/openapi.json get /v1/prompts
openapi: 3.1.0
info:
  title: Prompt Management API
  description: >-
    API for managing and retrieving prompt configurations with deployment and
    workspace information
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.llmide.app
    description: Production API server
security:
  - bearerAuth: []
paths:
  /v1/prompts:
    get:
      tags:
        - Prompts
      summary: Get prompt by deployment ID
      description: >-
        Retrieves the current active version's prompt metadata (title,
        description, LLM configuration, and message list) by deployment ID,
        along with associated deployment and workspace information
      operationId: getPromptByDeployId
      parameters:
        - name: deployId
          in: query
          description: >-
            The deployment ID to retrieve. Must belong to the current API key's
            workspace and be in active state
          required: true
          schema:
            type: string
            example: dep_12345
      responses:
        '200':
          description: Successful response with prompt data
          headers:
            X-RateLimit-Limit:
              description: The rate limit ceiling for the workspace
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window
              schema:
                type: integer
            X-RateLimit-Used:
              description: The number of requests used in the current rate limit window
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The time when the rate limit resets (Unix timestamp)
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptResponse'
        '400':
          description: Bad request - missing or invalid deployId parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing, invalid, or expired authorization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - deploy not found, inactive, or not accessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - monthly quota exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: curl
          source: |-
            curl -X GET "https://api.llmide.app/v1/prompts?deployId=dep_12345" \
              -H "Authorization: Bearer sk_live_xxx"
        - lang: python
          source: >-
            import requests


            headers = {
                'Authorization': 'Bearer sk_live_xxx'
            }


            params = {
                'deployId': 'dep_12345'
            }


            response = requests.get('https://api.llmide.app/v1/prompts',
            headers=headers, params=params)

            print(response.json())
        - lang: javascript
          source: >-
            const response = await
            fetch('https://api.llmide.app/v1/prompts?deployId=dep_12345', {
              method: 'GET',
              headers: {
                'Authorization': 'Bearer sk_live_xxx'
              }
            });


            const data = await response.json();

            console.log(data);
components:
  schemas:
    PromptResponse:
      type: object
      required:
        - id
        - title
        - messages
        - deploy
        - workspace
      properties:
        id:
          type: string
          description: Prompt ID
          example: prompt_abc123
        title:
          type: string
          description: Current version title
          example: Welcome Flow
        description:
          type: string
          nullable: true
          description: Current version description
          example: Greeting flow for new sign-ups
        llmConfig:
          type: object
          nullable: true
          description: Custom LLM configuration JSON
          example:
            provider: openai
            model: gpt-4o
            temperature: 0.4
        messages:
          type: array
          description: Prompt message sequence with role and content fields
          items:
            $ref: '#/components/schemas/PromptMessage'
        deploy:
          $ref: '#/components/schemas/DeployInfo'
        workspace:
          $ref: '#/components/schemas/WorkspaceInfo'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
          examples:
            - Missing or invalid deployId parameter
            - Missing or invalid authorization header
            - No API key provided
            - Invalid API key
            - Deploy not found or not accessible
            - Internal server error
    RateLimitErrorResponse:
      type: object
      required:
        - error
        - details
      properties:
        error:
          type: string
          description: Rate limit error message
          example: Rate limit exceeded
        details:
          type: object
          properties:
            limit:
              type: integer
              description: Monthly rate limit
            used:
              type: integer
              description: Requests used this month
            resetTime:
              type: integer
              description: Unix timestamp when the limit resets
            upgradeUrl:
              type: string
              nullable: true
              description: Optional upgrade link
    PromptMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: Message role
          example: system
        content:
          type: string
          description: Message content
          example: You are a helpful assistant.
    DeployInfo:
      type: object
      required:
        - id
        - name
        - currentVersion
        - isActive
      properties:
        id:
          type: string
          description: Deploy ID
          example: dep_12345
        name:
          type: string
          description: Deploy name
          example: Production
        currentVersion:
          type: integer
          description: Current version number
          example: 7
        isActive:
          type: boolean
          description: Whether the deployment is active
          example: true
    WorkspaceInfo:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Workspace ID
          example: ws_67890
        name:
          type: string
          description: Workspace name
          example: Acme Inc.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````