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

# Evaluate prompt

> Evaluate an AI prompt



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /ai/prompts/evaluate
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /ai/prompts/evaluate:
    post:
      tags:
        - AI - Prompts
      summary: Evaluate prompt
      description: Evaluate an AI prompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  title: Prompt
                  description: Prompt to evaluate.
                actions:
                  type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          slug:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          isBulkAllowed:
                            type: boolean
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - name
                          - slug
                          - description
                          - isBulkAllowed
                          - config
                      - anyOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: tool
                              toolUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              templateSlug:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              waitUntilFinished:
                                type: boolean
                            required:
                              - kind
                              - toolUuid
                              - templateSlug
                              - waitUntilFinished
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: agent
                              agentUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              templateSlug:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              waitUntilFinished:
                                type: boolean
                            required:
                              - kind
                              - agentUuid
                              - templateSlug
                              - waitUntilFinished
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: connector
                              integrationSlug:
                                type: string
                              connectorUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              actionSlug:
                                type: string
                            required:
                              - kind
                              - integrationSlug
                              - connectorUuid
                              - actionSlug
                  title: Actions
                  description: Actions available for evaluation.
                resources:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: model
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          slug:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          integrationSlug:
                            anyOf:
                              - type: string
                              - type: 'null'
                          modelUuid:
                            anyOf:
                              - type: string
                              - type: 'null'
                          filter:
                            anyOf:
                              - type: object
                                properties:
                                  conjonction:
                                    type: string
                                    enum:
                                      - or
                                      - and
                                  groups:
                                    type: array
                                    items: {}
                                required:
                                  - conjonction
                                  - groups
                              - type: 'null'
                          selectedColumnSlugs:
                            anyOf:
                              - type: array
                                items:
                                  type: string
                              - type: 'null'
                          limit:
                            anyOf:
                              - type: number
                              - type: 'null'
                          prompt:
                            anyOf:
                              - type: string
                              - type: 'null'
                          isReadOnly:
                            type: boolean
                        required:
                          - kind
                          - name
                          - slug
                          - description
                          - integrationSlug
                          - modelUuid
                          - filter
                          - selectedColumnSlugs
                          - limit
                          - prompt
                          - isReadOnly
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: file
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          slug:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          items:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: file
                                    fileUuid:
                                      type: string
                                  required:
                                    - kind
                                    - fileUuid
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: folder
                                    folderUuid:
                                      type: string
                                  required:
                                    - kind
                                    - folderUuid
                          prompt:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - kind
                          - name
                          - slug
                          - description
                          - items
                          - prompt
                  title: Resources
                  description: Resources available for evaluation.
                capabilities:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: sandbox
                          config:
                            type: object
                            properties:
                              scope:
                                type: string
                                enum:
                                  - chat
                                  - agent
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: context
                          config:
                            type: object
                            properties:
                              isReadOnly:
                                type: boolean
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: app
                          config:
                            type: object
                            properties:
                              appUuid:
                                type: string
                              canPromote:
                                type: boolean
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: code
                          config:
                            type: object
                            properties:
                              connectorUuid:
                                type: string
                              repository:
                                type: string
                              defaultBranch:
                                type: string
                              rootDirectory:
                                type: string
                              env:
                                type: array
                                items:
                                  oneOf:
                                    - type: object
                                      properties:
                                        key:
                                          type: string
                                          minLength: 1
                                        type:
                                          type: string
                                          const: public
                                        value:
                                          type: string
                                      required:
                                        - key
                                        - type
                                        - value
                                    - type: object
                                      properties:
                                        key:
                                          type: string
                                          minLength: 1
                                        type:
                                          type: string
                                          const: secret
                                        secretValue:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - encryption
                                            isEncrypted:
                                              type: boolean
                                            value:
                                              type: string
                                          required:
                                            - type
                                            - isEncrypted
                                            - value
                                      required:
                                        - key
                                        - type
                                        - secretValue
                                  type: object
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: document
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: webSearch
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: fileSearch
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: documentationSearch
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: codeInterpreter
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: memory
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                      - type: object
                        properties:
                          slug:
                            type: string
                            const: suggestedActions
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - slug
                          - config
                    type: object
                  title: Capabilities
                  description: Capabilities available for evaluation.
              required:
                - prompt
                - actions
                - resources
                - capabilities
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompt:
                    type: string
                    title: Prompt
                    description: Evaluated prompt.
                required:
                  - prompt
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````