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

# Create model gateway test

> Requires scopes: admin:org



## OpenAPI

````yaml /api-reference/openapi.json post /api/model-gateway/routing-profiles/{id}/test
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/model-gateway/routing-profiles/{id}/test:
    post:
      tags:
        - model gateway
      summary: Create model gateway test
      description: 'Requires scopes: admin:org'
      operationId: post_model_gateway_routing_profiles_id_test
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiModelGatewayRoutingProfilesIdTestResponse200ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - admin:org
components:
  schemas:
    PostApiModelGatewayRoutingProfilesIdTestResponse200ApplicationJson:
      type: object
      properties:
        requestedProfileId:
          oneOf:
            - type: 'null'
            - type: string
        requestedGatewayConfigId:
          type: number
        requestedModel:
          oneOf:
            - type: 'null'
            - type: string
        routedModel:
          oneOf:
            - type: 'null'
            - type: string
        returnedModel:
          oneOf:
            - type: 'null'
            - type: string
        routingExplanation:
          type: string
        runtimeConfigId:
          type: string
        ledgerUrl:
          type: string
        requestHash:
          type: string
        redactedPromptPreview:
          type: string
        redactionState:
          oneOf:
            - type: string
              enum:
                - unknown
            - type: string
              enum:
                - redacted
            - type: string
              enum:
                - partial
            - type: string
              enum:
                - hash_only
            - type: string
              enum:
                - raw_disallowed
            - type: string
              enum:
                - raw_allowed_internal
        evidenceSummary:
          type: object
          properties:
            ledgerId:
              type: string
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: string
            costRecordId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceIds:
              type: array
              items:
                type: number
            provenanceState:
              type: string
            latencyMs:
              type: number
            provider:
              oneOf:
                - type: 'null'
                - type: string
            model:
              oneOf:
                - type: 'null'
                - type: string
            cost:
              type: object
              properties:
                amountUsd:
                  oneOf:
                    - type: 'null'
                    - type: string
                source:
                  type: string
                known:
                  type: boolean
              additionalProperties: false
              required:
                - amountUsd
                - source
                - known
          additionalProperties: false
          required:
            - ledgerId
            - policyDecisionId
            - costRecordId
            - evidenceIds
            - provenanceState
            - latencyMs
            - provider
            - model
            - cost
        modelCallId:
          type: string
        status:
          oneOf:
            - type: string
              enum:
                - failed
            - type: string
              enum:
                - success
            - type: string
              enum:
                - cancelled
            - type: string
              enum:
                - blocked
            - type: string
              enum:
                - timeout
            - type: string
              enum:
                - fallback
        content:
          type: string
        model:
          oneOf:
            - type: 'null'
            - type: string
        provider:
          oneOf:
            - type: 'null'
            - type: string
        backend:
          oneOf:
            - type: string
              enum:
                - local
            - type: string
              enum:
                - litellm_proxy
            - type: string
              enum:
                - direct_provider
            - type: string
              enum:
                - customer_gateway
            - type: string
              enum:
                - openrouter
        usage:
          type: object
          properties:
            inputTokens:
              type: number
            outputTokens:
              type: number
            totalTokens:
              type: number
            cachedInputTokens:
              type: number
          additionalProperties: false
          required:
            - inputTokens
            - outputTokens
            - totalTokens
        cost:
          type: object
          properties:
            amountUsd:
              oneOf:
                - type: 'null'
                - type: string
            source:
              oneOf:
                - type: string
                  enum:
                    - unavailable
                - type: string
                  enum:
                    - estimated
                - type: string
                  enum:
                    - gateway_reported
                - type: string
                  enum:
                    - evalgate_computed
                - type: string
                  enum:
                    - unknown_model
          additionalProperties: false
          required:
            - amountUsd
            - source
        latencyMs:
          type: number
        policyDecision:
          oneOf:
            - type: string
              enum:
                - denied
            - type: string
              enum:
                - allowed
            - type: string
              enum:
                - warned
        fallbackChain:
          type: array
          items:
            type: string
        retryCount:
          type: number
        errorCode:
          type: string
        errorMessage:
          type: string
        responseHash:
          type: string
        evidenceGraphEdgeIds:
          type: array
          items:
            type: string
      additionalProperties: false
      required:
        - requestedProfileId
        - requestedGatewayConfigId
        - requestedModel
        - routedModel
        - returnedModel
        - routingExplanation
        - runtimeConfigId
        - ledgerUrl
        - requestHash
        - redactedPromptPreview
        - redactionState
        - evidenceSummary
        - modelCallId
        - status
        - content
        - model
        - provider
        - backend
        - usage
        - cost
        - latencyMs
        - policyDecision
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````