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

# Get Deployment

> Retrieve a specific deployed prompt or the latest deployment in a specific deployment environment.



## OpenAPI

````yaml GET /deployments
openapi: 3.1.1
info:
  title: Adaline API
  version: 2.0.0
  description: >-
    Public API for managing Adaline projects, prompts, datasets, evaluators,
    evaluations, providers, models, and deployments.


    Generated from Zod schemas — this spec is the single source of truth.
servers:
  - url: https://api.adaline.ai/v2
    description: Production API
security: []
tags:
  - name: datasets
    description: Manage prompt datasets and their columns and rows.
  - name: projects
    description: List and manage Adaline projects.
  - name: providers
    description: List configured LLM providers and their settings.
  - name: models
    description: List available models across providers.
  - name: prompts
    description: Create and manage prompts and their drafts.
  - name: evaluators
    description: Configure evaluators attached to a prompt.
  - name: evaluations
    description: Run and inspect evaluation results.
  - name: deployments
    description: Retrieve deployed prompt snapshots.
  - name: logs
    description: Ingest execution traces and spans for observability.
paths:
  /deployments:
    get:
      tags:
        - deployments
      summary: Retrieve a specific or latest deployment
      description: >-
        Retrieve a specific deployed prompt or the latest deployment in a
        specific deployment environment.
      operationId: getDeployment
      parameters:
        - name: promptId
          in: query
          required: true
          description: >-
            The unique identifier of the prompt. Required for both specific and
            latest deployment retrieval.
          schema:
            $ref: '#/components/schemas/BaseEntityId'
        - name: deploymentId
          in: query
          required: true
          description: >-
            The unique identifier of the deployment. Set to 'latest' or
            'current' to retrieve the latest deployment in the given
            environment.
          schema:
            type: string
        - name: deploymentEnvironmentId
          in: query
          required: false
          description: >-
            The unique identifier of the deployment environment. Required when
            retrieving the latest deployment (deploymentId=latest).
          schema:
            $ref: '#/components/schemas/BaseEntityId'
      responses:
        '200':
          description: Deployment retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
          headers:
            X-Request-Id:
              description: >-
                Unique identifier for the request. Returned in every response.
                Send a custom value to correlate requests, or omit to receive a
                generated UUID.
              schema:
                type: string
                format: uuid
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — invalid or unauthorized API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found — Deployment, prompt, or environment not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    BaseEntityId:
      title: Base Entity ID
      type: string
      description: Unique identifier for an entity, between 20 and 80 characters.
      minLength: 20
      maxLength: 80
    Deployment:
      title: Deployment
      type: object
      description: >-
        A deployment is a specific instance of a prompt that has been deployed
        to a specific environment.
      properties:
        id:
          type: string
          description: The unique identifier of the deployment.
        createdAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: The timestamp when the deployment was created.
        updatedAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: The timestamp when the deployment was last updated.
        createdByUserId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the user who created the deployment.
        updatedByUserId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the user who last updated the deployment.
        projectId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the project.
        promptId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the prompt.
        deploymentEnvironmentId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the deployment environment.
        prompt:
          $ref: '#/components/schemas/PromptSnapshot'
          description: The prompt snapshot that is deployed.
      required:
        - id
        - createdAt
        - updatedAt
        - createdByUserId
        - updatedByUserId
        - projectId
        - promptId
        - deploymentEnvironmentId
        - prompt
    ErrorResponse:
      title: Error Response
      type: object
      description: >-
        Standard error response envelope. Permits backend-specific sibling
        fields (e.g. Zod issue details) alongside the typed `error`.
      properties:
        error:
          description: >-
            Error details — typed envelope, or a raw string reason when the
            backend's validator produces a short summary (e.g. Zod validation
            fallback).
          oneOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable error code.
                  enum:
                    - VALIDATION_ERROR
                    - INVALID_CURSOR
                    - AUTHENTICATION_REQUIRED
                    - FORBIDDEN
                    - RESOURCE_NOT_FOUND
                    - CONFLICT
                    - PAYLOAD_TOO_LARGE
                    - RATE_LIMITED
                    - INTERNAL_ERROR
                message:
                  type: string
                  description: Human-readable error message.
                details:
                  type: array
                  description: Optional field-level validation details.
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      issue:
                        type: string
                    required:
                      - field
                      - issue
              required:
                - code
                - message
              additionalProperties: true
      required:
        - error
      additionalProperties: true
    UnixTimestamp:
      title: Unix Timestamp
      type: integer
      format: int64
      description: Unix timestamp in milliseconds.
      minimum: 1672511400000
      maximum: 33229420200000
    PromptSnapshot:
      title: Prompt Snapshot
      type: object
      description: >-
        A prompt snapshot is a collection of configuration, messages, tools, and
        variables that define the behavior of a model.
      properties:
        config:
          $ref: '#/components/schemas/PromptSnapshotConfig'
        messages:
          type: array
          description: Array of prompt messages (role and content).
          items:
            $ref: '#/components/schemas/PromptMessage'
        tools:
          type: array
          description: Array of prompt tools (function schema).
          items:
            $ref: '#/components/schemas/PromptTool'
        variables:
          type: array
          description: Array of prompt variables (name and modality).
          items:
            $ref: '#/components/schemas/PromptVariable'
      required:
        - config
        - messages
        - tools
        - variables
    PromptSnapshotConfig:
      type: object
      title: Prompt Snapshot Config
      description: >-
        Model provider and settings configuration. All fields are optional
        because a deployment snapshot may have an incomplete configuration.
      properties:
        providerName:
          type: string
          description: Name of the model provider in lowercase.
          minLength: 1
          example: openai
        providerId:
          $ref: '#/components/schemas/BaseEntityId'
          description: Adaline internal UUID for model provider.
          minLength: 1
          example: 6e94350a-95a9-48e7-8eab-a9f35ec2dc9d
        model:
          type: string
          description: Model name as defined in the provider's API.
          minLength: 1
          example: gpt-4o
        settings:
          type: object
          description: >-
            Runtime configuration settings passed to the model provider,
            flexible key-value pairs.
          additionalProperties: true
          example:
            temperature: 0.7
            maxTokens: 1000
            topP: 0.9
            presencePenalty: 0.1
    PromptMessage:
      type: object
      title: Prompt Message
      description: Prompt message with role and content.
      required:
        - role
        - content
      properties:
        role:
          $ref: '#/components/schemas/MessageRole'
        content:
          type: array
          items:
            $ref: '#/components/schemas/MessageContent'
    PromptTool:
      title: Prompt Tool
      description: >-
        Union type for different tool types available to LLM (currently
        functions)
      oneOf:
        - $ref: '#/components/schemas/ToolFunction'
          title: Function
      discriminator:
        propertyName: type
        mapping:
          function:
            $ref: '#/components/schemas/ToolFunction'
    PromptVariable:
      title: Prompt Variable
      type: object
      required:
        - modality
      description: >-
        Prompt variable definition. When this appears as the value type of a
        `variables` map, the name is the map key and is therefore omitted here;
        when it appears as an array item, the `name` field is set explicitly.
      properties:
        name:
          type: string
          description: >-
            The variable name as it appears in the prompt template. Omitted when
            the enclosing container is a map keyed by variable name.
        modality:
          $ref: '#/components/schemas/VariableModality'
    MessageRole:
      title: Message Role
      type: string
      enum:
        - system
        - user
        - assistant
        - tool
      description: The role of a message in a prompt conversation.
    MessageContent:
      title: Message Content
      description: Message content type for prompt messages, discriminated by `modality`.
      oneOf:
        - $ref: '#/components/schemas/TextContent'
          title: Text
        - $ref: '#/components/schemas/ImageContent'
          title: Image
        - $ref: '#/components/schemas/PdfContent'
          title: PDF
        - $ref: '#/components/schemas/ToolCallContent'
          title: Tool Call
        - $ref: '#/components/schemas/ToolResponseContent'
          title: Tool Response
        - $ref: '#/components/schemas/ReasoningContent'
          title: Reasoning
        - $ref: '#/components/schemas/ErrorContent'
          title: Error
        - $ref: '#/components/schemas/SearchResultContent'
          title: Search Result
      discriminator:
        propertyName: modality
        mapping:
          text:
            $ref: '#/components/schemas/TextContent'
          image:
            $ref: '#/components/schemas/ImageContent'
          pdf:
            $ref: '#/components/schemas/PdfContent'
          tool-call:
            $ref: '#/components/schemas/ToolCallContent'
          tool-response:
            $ref: '#/components/schemas/ToolResponseContent'
          reasoning:
            $ref: '#/components/schemas/ReasoningContent'
          error:
            $ref: '#/components/schemas/ErrorContent'
          search-result:
            $ref: '#/components/schemas/SearchResultContent'
    ToolFunction:
      type: object
      title: Tool Function
      description: >-
        Tool function definition for LLM with schema and optional HTTP request
        configuration.
      required:
        - type
        - definition
      properties:
        type:
          type: string
          enum:
            - function
        definition:
          type: object
          required:
            - schema
          properties:
            schema:
              $ref: '#/components/schemas/FunctionSchema'
        request:
          anyOf:
            - $ref: '#/components/schemas/FunctionRequest'
            - type: 'null'
    VariableModality:
      title: Variable Modality
      type: string
      enum:
        - text
        - image
        - pdf
        - api
        - prompt
      description: Variable modality type.
    TextContent:
      type: object
      title: Text Content
      description: Text content type for prompt messages.
      required:
        - modality
        - value
      properties:
        modality:
          type: string
          enum:
            - text
        value:
          type: string
    ImageContent:
      type: object
      title: Image Content
      description: Image content type for prompt messages with detail level specification.
      required:
        - modality
        - detail
        - value
      properties:
        modality:
          type: string
          enum:
            - image
        detail:
          type: string
          enum:
            - low
            - medium
            - high
            - auto
        value:
          $ref: '#/components/schemas/ImageContentValue'
    PdfContent:
      type: object
      title: PDF Content
      description: PDF document content type for prompt messages with file metadata.
      required:
        - modality
        - value
        - file
      properties:
        modality:
          type: string
          enum:
            - pdf
        value:
          $ref: '#/components/schemas/PdfContentValue'
        file:
          type: object
          required:
            - name
            - id
          properties:
            name:
              type: string
            id:
              type: string
            size:
              type:
                - number
                - 'null'
    ToolCallContent:
      type: object
      title: Tool Call Content
      description: Tool/function call request from LLM with arguments and metadata.
      required:
        - modality
        - index
        - id
        - name
        - arguments
      properties:
        modality:
          type: string
          enum:
            - tool-call
        index:
          type: integer
          minimum: 0
        id:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        arguments:
          type: string
        serverName:
          type:
            - string
            - 'null'
    ToolResponseContent:
      type: object
      title: Tool Response Content
      description: >-
        Tool/function execution response returned to LLM with result data and
        optional API metadata.
      required:
        - modality
        - index
        - id
        - name
        - data
      properties:
        modality:
          type: string
          enum:
            - tool-response
        index:
          type: integer
          minimum: 0
        id:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        data:
          type: string
        apiResponse:
          type:
            - object
            - 'null'
          properties:
            statusCode:
              type: integer
              minimum: 0
    ReasoningContent:
      type: object
      title: Reasoning Content
      description: >-
        Reasoning content type for LLM chain-of-thought and extended thinking
        responses.
      required:
        - modality
        - value
      properties:
        modality:
          type: string
          enum:
            - reasoning
        value:
          $ref: '#/components/schemas/ReasoningContentValueUnion'
    ErrorContent:
      type: object
      title: Error Content
      description: Error content type for LLM safety and content filtering errors.
      required:
        - modality
        - value
      properties:
        modality:
          type: string
          enum:
            - error
        value:
          $ref: '#/components/schemas/ErrorContentValue'
    SearchResultContent:
      type: object
      title: Search Result Content
      description: >-
        Search result content type for grounding LLM responses with web search
        data.
      required:
        - modality
        - value
      properties:
        modality:
          type: string
          enum:
            - search-result
        value:
          $ref: '#/components/schemas/SearchResultContentValue'
    FunctionSchema:
      type: object
      title: Function Schema
      description: >-
        Function/tool schema definition for LLM function calling with
        parameters.
      required:
        - name
        - description
        - parameters
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z0-9_]{1,64}$
          maxLength: 64
        description:
          type: string
          maxLength: 4096
        parameters:
          type: object
          additionalProperties: true
          description: Function parameters - can be any valid JSON schema
        strict:
          type:
            - boolean
            - 'null'
    FunctionRequest:
      title: Function Request
      description: >-
        Union type for different function/tool execution methods (currently
        HTTP)
      oneOf:
        - $ref: '#/components/schemas/FunctionRequestHttp'
          title: HTTP
      discriminator:
        propertyName: type
        mapping:
          http:
            $ref: '#/components/schemas/FunctionRequestHttp'
    ImageContentValue:
      title: Image Content Value
      description: Union type for image content - either base64 encoded or URL reference.
      oneOf:
        - $ref: '#/components/schemas/Base64ImageContentValue'
          title: Base64
        - $ref: '#/components/schemas/UrlImageContentValue'
          title: URL
        - $ref: '#/components/schemas/Base64HostedImageContentValue'
          title: Base64 Hosted
      discriminator:
        propertyName: type
        mapping:
          base64:
            $ref: '#/components/schemas/Base64ImageContentValue'
          url:
            $ref: '#/components/schemas/UrlImageContentValue'
          base64-hosted:
            $ref: '#/components/schemas/Base64HostedImageContentValue'
    PdfContentValue:
      title: PDF Content Value
      description: Union type for PDF content - either base64 encoded or URL reference.
      oneOf:
        - $ref: '#/components/schemas/Base64PdfContentValue'
          title: Base64
        - $ref: '#/components/schemas/UrlPdfContentValue'
          title: URL
        - $ref: '#/components/schemas/Base64HostedPdfContentValue'
          title: Base64 Hosted
      discriminator:
        propertyName: type
        mapping:
          base64:
            $ref: '#/components/schemas/Base64PdfContentValue'
          url:
            $ref: '#/components/schemas/UrlPdfContentValue'
          base64-hosted:
            $ref: '#/components/schemas/Base64HostedPdfContentValue'
    ReasoningContentValueUnion:
      title: Reasoning Content Value Union
      description: >-
        Union type for reasoning content - either full thinking or redacted
        version.
      oneOf:
        - $ref: '#/components/schemas/ReasoningContentValue'
          title: Thinking
        - $ref: '#/components/schemas/RedactedReasoningContentValue'
          title: Redacted
      discriminator:
        propertyName: type
        mapping:
          thinking:
            $ref: '#/components/schemas/ReasoningContentValue'
          redacted:
            $ref: '#/components/schemas/RedactedReasoningContentValue'
    ErrorContentValue:
      title: Error Content Value
      description: Union type for error content values.
      oneOf:
        - $ref: '#/components/schemas/SafetyErrorContentValue'
          title: Safety Error
      discriminator:
        propertyName: type
        mapping:
          safety:
            $ref: '#/components/schemas/SafetyErrorContentValue'
    SearchResultContentValue:
      title: Search Result Content Value
      description: Union type for search result content values.
      oneOf:
        - $ref: '#/components/schemas/SearchResultGoogleContentValue'
          title: Google
      discriminator:
        propertyName: type
        mapping:
          google:
            $ref: '#/components/schemas/SearchResultGoogleContentValue'
    FunctionRequestHttp:
      type: object
      title: Function Request HTTP
      description: >-
        HTTP request configuration for executing function/tool calls via REST
        API.
      required:
        - type
        - method
        - url
      properties:
        type:
          type: string
          enum:
            - http
        method:
          type: string
          enum:
            - get
            - post
        url:
          type: string
          format: uri
        headers:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        query:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        body:
          type:
            - object
            - 'null'
          additionalProperties: true
        proxyUrl:
          type:
            - string
            - 'null'
          format: uri
        proxyHeaders:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        retry:
          anyOf:
            - $ref: '#/components/schemas/FunctionRequestRetry'
            - type: 'null'
    Base64ImageContentValue:
      type: object
      title: Base64 Image Content Value
      description: Base64-encoded image data with media type specification.
      required:
        - type
        - base64
        - mediaType
      properties:
        type:
          type: string
          enum:
            - base64
        base64:
          type: string
        mediaType:
          type: string
          enum:
            - png
            - jpeg
            - webp
            - gif
    UrlImageContentValue:
      type: object
      title: URL Image Content Value
      description: URL reference to an externally hosted image.
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - url
        url:
          type: string
    Base64HostedImageContentValue:
      type: object
      title: Base64 Hosted Image Content Value
      description: >-
        Base64-encoded image data with path and base64 hash, reference to a
        base64 image hosted on the platform.
      required:
        - type
        - path
        - base64Hash
      properties:
        type:
          type: string
          enum:
            - base64-hosted
        path:
          type: string
          minLength: 1
        base64Hash:
          type: string
          minLength: 1
    Base64PdfContentValue:
      type: object
      title: Base64 PDF Content Value
      description: Base64-encoded PDF document data.
      required:
        - type
        - base64
      properties:
        type:
          type: string
          enum:
            - base64
        base64:
          type: string
    UrlPdfContentValue:
      type: object
      title: URL PDF Content Value
      description: URL reference to an externally hosted PDF document.
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - url
        url:
          type: string
    Base64HostedPdfContentValue:
      type: object
      title: Base64 Hosted PDF Content Value
      description: >-
        Base64-encoded PDF document data with path and preview, reference to a
        base64 PDF hosted on the platform.
      required:
        - type
        - path
        - preview
      properties:
        type:
          type: string
          enum:
            - base64-hosted
        path:
          type: string
          minLength: 1
        preview:
          type: string
          minLength: 1
    ReasoningContentValue:
      type: object
      title: Reasoning Content Value
      description: >-
        LLM reasoning/thinking content with cryptographic signature for
        verification.
      required:
        - type
        - thinking
        - signature
      properties:
        type:
          type: string
          enum:
            - thinking
        thinking:
          type: string
        signature:
          type: string
    RedactedReasoningContentValue:
      type: object
      title: Redacted Reasoning Content Value
      description: Redacted/masked reasoning content for privacy-sensitive contexts.
      required:
        - type
        - data
      properties:
        type:
          type: string
          enum:
            - redacted
        data:
          type: string
    SafetyErrorContentValue:
      type: object
      title: Safety Error Content Value
      description: >-
        Safety filter error with category, probability, and blocking
        information.
      required:
        - type
        - value
      properties:
        type:
          type: string
          enum:
            - safety
        value:
          type: object
          required:
            - category
            - probability
            - blocked
            - message
          properties:
            category:
              type: string
            probability:
              type: string
            blocked:
              type: boolean
            message:
              type: string
    SearchResultGoogleContentValue:
      type: object
      title: Search Result Google Content Value
      description: Google search result with query, responses, and references.
      required:
        - type
        - query
        - responses
        - references
      properties:
        type:
          type: string
          enum:
            - google
        query:
          type: string
        responses:
          type: array
          items:
            type: object
            required:
              - source
              - url
              - title
            properties:
              source:
                type: string
              url:
                type: string
              title:
                type: string
              snippet:
                type: string
        references:
          type: array
          items:
            type: object
            required:
              - text
              - responseIndices
            properties:
              text:
                type: string
              responseIndices:
                type: array
                items:
                  type: number
              startIndex:
                type: number
              endIndex:
                type: number
              confidenceScores:
                type: array
                items:
                  type: number
    FunctionRequestRetry:
      type: object
      title: Function Request Retry
      description: >-
        Retry configuration for function/tool execution with exponential backoff
        settings.
      required:
        - maxAttempts
        - initialDelay
        - exponentialFactor
      properties:
        maxAttempts:
          type: integer
          minimum: 1
        initialDelay:
          type: integer
          minimum: 1
        exponentialFactor:
          type: integer
          minimum: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Workspace API key. Pass as `Authorization: Bearer <key>`.'

````