사용자 지정 모델 API는 개발자와 관리자가 독점 또는 타사 LLM(대형 언어 모델) 및 기타 AI 모델을 AI Agent Studio에 직접 원활하게 통합할 수 있는 기능을 제공합니다.

  • 모델에 대한 정보를 캡슐화하는 JSON 페이로드 스키마가 필요합니다. 스키마는 공급업체의 이름, 특정 모델의 이름, 인증 프로토콜, API 엔드포인트 세부 정보(경로 매개변수, 쿼리 매개변수 및 필수 헤더 포함), 요청 및 응답 본문의 구조와 같은 속성을 정의합니다.
  • API는 사용자가 요청 및 응답 본문 내에서 변수를 정의할 수 있도록 하여 실행 시간 동안 동적으로 채워질 수 있습니다. 이러한 변수들은 특정 주석 기호를 사용하여 다양한 목적으로 지정될 수 있습니다.
    • PROMPT_QUERY (필수): 이 주석은 해당 변수가 AI Skills 페이지에서 사용자가 제공한 프롬프트로 대체되어야 함을 나타냅니다. 이는 사용자 입력 프롬프트를 모델에 전달하는 데 필수적입니다.
    • REQUEST_PARAMETER (필수): 이 주석은 변수가 Model connections 페이지에서 구성 가능한 매개변수로 노출되어야 함을 나타냅니다.
    • MODEL_PARAMETER : REQUEST_PARAMETER와 유사하게, 이 주석은 AI Skills 페이지에서 설정할 변수를 지정합니다.
    • RESPONSE_PARAMETER (필수): 이 주석은 변수가 AI 모델의 응답에서 반환될 것임을 나타냅니다.
  • API는 성공적으로 생성된 모델과 함께 200 OK 응답을 반환합니다.
POST https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel
요청 본문:
{
   "name":"Azure OpenAI reasoning models",
   "version":"0",
   "authAction":{
      "authType":"CUSTOM_KEYS",
      "customKeys":{
         "keys":[
            {
               "location":"header",
               "keyName":"Authorization",
               "prefix":"Bearer "
            }
         ]
      }
   },
   "apiType":"REST",
   "actions":[
      {
         "name":"o3-mini",
         "displayName":"o3-mini",
         "description":"The o1 and o3 series models are specifically designed to tackle reasoning 
          and problem-solving tasks with increased focus and capability. These models spend more time 
          processing and understanding the user's request, making them exceptionally strong in areas 
          like science, coding, math and similar fields. For example, o1 can be used by healthcare researchers 
          to annotate cell sequencing data, by physicists to generate complicated mathematical formulas needed 
          for quantum optics, and by developers in all fields to build and execute multi-step workflows.",
         "method":"POST",
         "uri":"https://{deployment}.openai.azure.com/openai/deployments/o3-mini/chat/completions?api-version=2025-01-01-preview",
         "params":[
            {
               "type":"HEADERS"
            },
            {
               "type":"PATH_PARAM",
               "attribute":[
                  {
                     "name":"deployment",
                     "label":"Deployment",
                     "value":{
                        "type":"TEXT",
                        "string":"aai-openai2"
                     }
                  }
               ]
            }
         ],
         "request":{
            "raw":{
               "body":"{\n        \"messages\": [\n            {\n                \"role\": \"user\",
                \n                \"content\": \"I am going to       Paris, what should I see?\"\n            
                 }\n        ],\n        \"max_completion_tokens\": 100000,\n        \"model\": \"o3-mini\"\n    }",
               "variables":[
                  {
                     "path":"$.max_completion_tokens",
                     "attribute":{
                        "name":"max_completion_tokens",
                        "label":"max_completion_tokens",
                        "value":{
                           "type":"INTEGER",
                           "number":"100000"
                        },
                        "annotations":[
                           "REQUEST_PARAMETER"
                        ]
                     }
                  },
                  {
                     "path":"$.messages.content",
                     "attribute":{
                        "name":"prompt",
                        "label":"prompt",
                        "value":{
                           "type":"TEXT"
                        },
                        "annotations":[
                           "PROMPT_QUERY"
                        ]
                     }
                  }
               ]
            }
         },
         "response":{
            "body":"{\n    \"id\": \"chatcmpl-APwQdLa9WCQAdZg0dO5OjGr2ER4sX\",\n    \"object\": \"chat.completion\",\n
                   \"created\": 1730746163,\n    \"model\": \"o3-mini-2025-01-31\",\n    \"choices\": [\n        {\n
                   \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                
                   \"content\": \"Sure! They are one of the most mysterious and exciting objects in space.\",\n
                   \"refusal\": null\n            },\n            \"finish_reason\": \"stop\"\n        }\n    ],\n
                   \"usage\": {\n                \"prompt_tokens\": 17,\n        \"completion_tokens\": 959,\n
                   \"total_tokens\": 976,\n        \"prompt_tokens_details\": {\n            \"cached_tokens\": 0\n
                    },\n        \"completion_tokens_details\": {\n            \"reasoning_tokens\": 64\n        }\n
                    },\n    \"system_fingerprint\": \"fp_35c19d48ca\"\n}",
            "variables":[
               {
                  "path":"$.usage.completion_tokens",
                  "attribute":{
                     "name":"completion_tokens",
                     "label":"completion_tokens",
                     "value":{
                        "type":"INTEGER"
                     },
                     "annotations":[
                        "RESPONSE_PARAMETER"
                     ],
                     "canonicalName":"choices[0].completionTokens"
                  }
               },
               {
                  "path":"$.choices.message.content",
                  "attribute":{
                     "name":"content",
                     "label":"content",
                     "value":{
                        "type":"TEXT",
                        "string":"Some response from LLM"
                     },
                     "annotations":[
                        "RESPONSE_PARAMETER"
                     ],
                     "canonicalName":"choices[0].value"
                  }
               },
               {
                  "path":"$.model",
                  "attribute":{
                     "name":"model",
                     "label":"model",
                     "value":{
                        "type":"TEXT"
                     },
                     "annotations":[
                        "RESPONSE_PARAMETER"
                     ],
                     "canonicalName":"model_name"
                  }
               },
               {
                  "path":"$.usage.prompt_tokens",
                  "attribute":{
                     "name":"prompt_tokens",
                     "label":"prompt_tokens",
                     "value":{
                        "type":"INTEGER"
                     },
                     "annotations":[
                        "RESPONSE_PARAMETER"
                     ],
                     "canonicalName":"choices[0].promptTokens"
                  }
               },
               {
                  "path":"$.usage.total_tokens",
                  "attribute":{
                     "name":"total_tokens",
                     "label":"total_tokens",
                     "value":{
                        "type":"INTEGER"
                     },
                     "annotations":[
                        "RESPONSE_PARAMETER"
                     ],
                     "canonicalName":"choices[0].totalTokens"
                  }
               }
            ]
         }
      }
   ]
}

요청 매개변수
매개변수 유형 필수 설명
name 문자열 사용자 지정 모델의 이름
설명 문자열 아니오 사용자 지정 모델의 설명
authAction 객체 AI 모델 호출에 대한 인증 옵션을 정의합니다. 자세한 내용은 다음을 참고하십시오.
apiType 문자열 API 유형(예: "REST") 지정
작업 Array 사용자 정의 모델 내에서 특정 모델 엔드포인트나 작업을 정의하는 각 객체의 배열이 포함되어 있습니다.

authAction 객체

{
   "name":"Azure OpenAI reasoning models",
   "description":"string",
   "version":"0",
   "authAction":{
      "authType":"CUSTOM_KEYS",
      "customKeys":{
         "keys":[
            {
               "location":"header",
               "keyName":"Authorization",
               "prefix":"Bearer "
            }
         ]
      }
   }

{
   "name":"Bedrock - Claude2.1",
   "description":"string",
   "version":"string",
   "authAction":{
      "authType":"AWS_SIGNATURE_V4",
      "awsSignatureV4":{
         "accessKey":{
            "location":"header",
            "keyName":"aws_sign_access_key"
         },
         "secretkey":{
            "location":"header",
            "keyName":"aws_sign_access_key"
         },
         "sessionkey":{
            "location":"header",
            "keyName":"aws_sign_session_key"
         }
      }
   },
   "api_type":"REST",
   "actions":[
      {
         .... 
      }
   ]
}
매개변수 유형 필수 설명
authType 문자열 인증 유형입니다. API_KEY는 API 키, OAUTH2는 OAuth2, CUSTOM_KEYS는 여러 키, AWS_SIGNATURE_V4는 AWS 전용 인증에 사용됩니다.
API_KEY, OAUTH2, 또는 CUSTOM_KEYS 객체 사용자 지정 인증 키를 정의합니다. 속성은 아래의 keys에 설명되어 있습니다.
  • authTypeAPI_KEY인 경우 API_KEY가 필요합니다.
  • authTypeOAUTH2인 경우 OAUTH2가 필요합니다.
  • authTypeCUSTOM_KEYS인 경우 CUSTOM_KEYS가 필요합니다.
↳↳ keys Array 인증을 위한 주요 객체의 배열입니다.
↳↳↳ location 문자열 키를 배치해야 할 위치(예: "header")입니다.
↳↳↳keyName 문자열 키의 이름입니다(예: "Authorization", "x-api-key").
↳↳↳ prefix 객체 아니오 키 값에 추가할 접두사(예: 베어러 토큰의 경우 "Bearer")입니다. 이는 선택 사항입니다.
awsSignatureV4 객체 authTypeAWS_SIGNATURE_V4인 경우 AWS_SIGNATURE_V4가 필요합니다. 이 객체는 AWS Signature 인증을 위한 AWS 자격증명(액세스 키 ID, 비밀 액세스 키, 세션 키)을 정의합니다.
↳↳ accessKey 객체 AWS 액세스 키 ID를 정의합니다.
↳↳↳ location 문자열 액세스 키가 배치되어야 하는 위치입니다(예: "header", "query").
↳↳↳ keyName 문자열 액세스 키의 매개변수 이름입니다(예: "aws_sign_access_key").
↳↳ secretkey 객체 AWS 비밀 액세스 키를 정의합니다.
↳↳↳ location 문자열 비밀 키를 배치해야 할 위치입니다.
↳↳↳ keyName 문자열 비밀 키의 매개변수 이름입니다.
↳↳ sessionkey 객체 아니오 AWS 세션 키를 정의합니다(선택 사항).
↳↳↳ location 문자열 세션 키를 배치해야 하는 위치입니다.
↳↳↳ keyName 문자열 세션 키의 매개변수 이름입니다.

actions 배열

{
   "actions":[
      {
         "name":"o3-mini",
         "displayName":"o3-mini",
         "description":"The o1 and o3 series models are specifically designed to tackle reasoning 
          and problem-solving tasks with increased focus and capability. These models spend more time 
          processing and understanding the user's request, making them exceptionally strong in areas 
          like science, coding, math and similar fields. For example, o1 can be used by healthcare researchers 
          to annotate cell sequencing data, by physicists to generate complicated mathematical formulas needed 
          for quantum optics, and by developers in all fields to build and execute multi-step workflows.",
         "method":"POST",
         "uri":"https://{deployment}.openai.azure.com/openai/deployments/o3-mini/chat/completions?api-version=2025-01-01-preview",
         "params":[
            {
               "type":"string",
               "attribute":[
                  {
                     "name":"string",
                     "label":"string",
                     "value":{
                        "type":"string",
                        "string":"string",
                        "number":"string"
                     }
                  }
               ]
            }
         ],
         "request":{
            "raw":{
               "body":"string",
               "variables":[
                  {
                     ....
                  }
               ]
            }
         },
         "response":{
            "body":"string",
            "variables":[
               {
                  ....
               }
            ]
         }
      }
   ]
}
매개변수 유형 필수 설명
name 문자열 특정 모델 엔드포인트/작업의 프로그래밍 이름입니다.
displayName 문자열 UI에 표시되는 모델 엔드포인트의 사용자 친화적인 이름입니다.
설명 문자열 아니오 모델 엔드포인트 및 해당 기능에 대한 자세한 설명입니다.
method 문자열 API 호출에 대한 HTTP 메서드입니다. 대부분의 생성형 AI 모델에서는 일반적으로 POST이어야 합니다.
uri 문자열 AI 모델 엔드포인트의 전체 URI입니다. URI의 동적 매개변수입니다.
params Array 아니오 Model connection을 구성할 때 사용되는 매개변수 모음이 포함되어 있으며, 런타임에 AI 모델 API를 호출할 때 URI에 삽입됩니다. 매개변수는 PATH_PARAM 변수이거나 QUERY_PARAM 변수일 수 있습니다. 이 API 요청과 관련된 HEADERS를 추가할 수도 있습니다. 이 예시에서 deploymentIdprojectId는 PATH_PARAM 변수이고 apiVersion은 QUERY_PARAM 변수입니다.
요청 객체 변수와 주석을 포함하여 모델에 보내야 하는 데이터의 형식과 구조를 정의합니다. 본문은 요청의 구조와 내용을 지정합니다. 변수 배열은 본문 내의 동적 요소를 정의하며, 경로를 사용하여 JSON 구조에서 변수의 위치를 지정합니다.
응답 객체 변수, 해당 주석, 해당 표준 이름을 포함하여 모델이 반환할 데이터의 형식과 구조를 지정합니다. 본문은 응답의 구조와 내용을 지정합니다. 변수 배열은 본문 내의 동적 요소를 정의하며, 경로를 사용하여 JSON 구조에서 변수의 위치를 지정합니다.

params 배열

{
   "params":[
      {
         "type":"HEADERS"
      },
      {
         "type":"PATH_PARAM",
         "attribute":[
            {
               "name":"deployment",
               "label":"Deployment",
               "value":{
                  "type":"TEXT",
                  "string":"aai-openai2"
               }
            }
         ]
      }
   ]
매개변수 유형 필수 설명
유형 문자열 매개변수의 유형입니다(예: HEADERS, PATH_PARAM, QUERY_PARAM).
속성 Array 매개변수 세부 정보를 정의하는 속성 객체의 배열입니다. PATH_PARAMQUERY_PARAM에 필요합니다.
name 문자열 매개변수의 이름입니다(예: "deployment", "api-version").
label 문자열 아니오 UI에 표시되는 매개변수의 사용자 친화적인 라벨입니다.
value 객체 아니오 매개변수의 기본 또는 초기 값을 포함하는 객체입니다. 다음은 속성입니다.
  • type(문자열): 매개변수 값의 데이터 유형입니다(예: TEXT, INTEGER).
  • string(문자열): typeTEXT인 경우의 문자열 값입니다.
  • number(문자열): typeINTEGER인 경우의 숫자 값입니다.

request 객체

{
    "request":{
      "raw":{
         "body":"{\n        \"messages\": [\n            {\n                \"role\": \"user\",
                \n                \"content\": \"I am going to       Paris, what should I see?\"\n            
                 }\n        ],\n        \"max_completion_tokens\": 100000,\n        \"model\": \"o3-mini\"\n    }",
         "variables":[
            {
               "path":"$.max_completion_tokens",
               "attribute":{
                  "name":"max_completion_tokens",
                  "label":"max_completion_tokens",
                  "value":{
                     "type":"INTEGER",
                     "number":"100000"
                  },
                  "annotations":[
                     "REQUEST_PARAMETER"
                  ]
               }
            },
            {
               "path":"$.messages.content",
               "attribute":{
                  "name":"prompt",
                  "label":"prompt",
                  "value":{
                     "type":"TEXT"
                  },
                  "annotations":[
                     "PROMPT_QUERY"
                  ]
               }
            }
         ]
      }
   }
매개변수 유형 필수 설명
raw 객체 원시 요청 본문과 그 동적 변수를 정의합니다.
body 문자열 요청 본문 구조를 나타내는 원시 JSON 문자열입니다. 이 문자열은 변수에 대한 자리 표시자를 포함해야 합니다.
variables Array 아니오 body 내의 동적 요소를 정의하는 객체 배열입니다.
↳↳ path 문자열 body JSON 구조 내에 있는 변수 위치에 대한 JSONPath입니다.
↳↳ attribute 객체 변수의 속성을 설명하는 객체입니다.
↳↳↳ name 문자열 변수의 내부 이름입니다.
↳↳↳label 문자열 아니오 변수를 위한 사용자 친화적인 라벨입니다.
↳↳↳ value 객체 아니오 변수의 기본 또는 초기 값을 포함하는 객체입니다.
↳↳↳ annotations Array 아니오 변수의 목적을 지정하는 문자열 배열입니다. 지원되는 주석: PROMPT_QUERY, REQUEST_PARAMETER, MODEL_PARAMETER.

response 객체

{
      "response":{
      "body":"{\n    \"id\": \"chatcmpl-APwQdLa9WCQAdZg0dO5OjGr2ER4sX\",\n    \"object\": \"chat.completion\",\n
                   \"created\": 1730746163,\n    \"model\": \"o3-mini-2025-01-31\",\n    \"choices\": [\n        {\n
                   \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                
                   \"content\": \"Sure! They are one of the most mysterious and exciting objects in space.\",\n
                   \"refusal\": null\n            },\n            \"finish_reason\": \"stop\"\n        }\n    ],\n
                   \"usage\": {\n                \"prompt_tokens\": 17,\n        \"completion_tokens\": 959,\n
                   \"total_tokens\": 976,\n        \"prompt_tokens_details\": {\n            \"cached_tokens\": 0\n
                    },\n        \"completion_tokens_details\": {\n            \"reasoning_tokens\": 64\n        }\n
                    },\n    \"system_fingerprint\": \"fp_35c19d48ca\"\n}",
      "variables":[
         {
            "path":"$.usage.completion_tokens",
            "attribute":{
               "name":"completion_tokens",
               "label":"completion_tokens",
               "value":{
                  "type":"INTEGER"
               },
               "annotations":[
                  "RESPONSE_PARAMETER"
               ],
               "canonicalName":"choices[0].completionTokens"
            }
         },
         {
            "path":"$.choices.message.content",
            "attribute":{
               "name":"content",
               "label":"content",
               "value":{
                  "type":"TEXT",
                  "string":"Some response from LLM"
               },
               "annotations":[
                  "RESPONSE_PARAMETER"
               ],
               "canonicalName":"choices[0].value"
            }
         },
         {
            "path":"$.model",
            "attribute":{
               "name":"model",
               "label":"model",
               "value":{
                  "type":"TEXT"
               },
               "annotations":[
                  "RESPONSE_PARAMETER"
               ],
               "canonicalName":"model_name"
            }
         },
         {
            "path":"$.usage.prompt_tokens",
            "attribute":{
               "name":"prompt_tokens",
               "label":"prompt_tokens",
               "value":{
                  "type":"INTEGER"
               },
               "annotations":[
                  "RESPONSE_PARAMETER"
               ],
               "canonicalName":"choices[0].promptTokens"
            }
         },
         {
            "path":"$.usage.total_tokens",
            "attribute":{
               "name":"total_tokens",
               "label":"total_tokens",
               "value":{
                  "type":"INTEGER"
               },
               "annotations":[
                  "RESPONSE_PARAMETER"
               ],
               "canonicalName":"choices[0].totalTokens"
            }
         }
      ]
   }
}
매개변수 유형 필수 설명
본문 문자열 모델에서 예상되는 응답 본문 구조를 나타내는 원시 JSON 문자열입니다.
변수 Array 아니오 응답 본문에서 동적 요소를 추출하는 방법을 정의하는 객체 배열입니다.
path 문자열 body JSON 구조 내에 있는 변수 위치에 대한 JSONPath입니다.
attribute 객체 변수의 속성을 설명하는 객체입니다.
↳↳ name 문자열 변수의 내부 이름입니다.
↳↳label 문자열 아니오 변수를 위한 사용자 친화적인 라벨입니다.
↳↳ value 객체 아니오 변수의 기본 또는 초기 값을 포함하는 객체입니다.
↳↳ annotations Array 아니오 변수의 목적을 지정하는 문자열 배열입니다. 지원되는 주석: RESPONSE_PARAMETER.
↳↳ canonicalName 문자열 아니오 Automation Anywhere 표준 스키마 내 변수에 대한 JSON 경로.
  • 응답을 생성하는 데 소모된 토큰 수를 채우려면 choices[0].completionTokens를 사용합니다.
  • LLM 응답을 채우려면 choices[0].value를 사용합니다.
  • AI 모델의 이름이나 식별자를 입력하려면 model_name을 사용합니다.
  • 프롬프트에서 소모된 토큰 수를 채우려면 choices[0].promptTokens를 사용합니다.
  • 요청을 이행하는 데 소모된 총 토큰 수를 채우려면 choices[0].totalTokens를 사용합니다.

응답 및 응답 매개변수를 포함하여 사용자 지정 모델 생성 API에 대한 자세한 내용은 AI Agent Studio API를 참조하십시오.

다른 사용자 정의 모델 API

사용자 지정 모델 정보 가져오기 API
GET https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/vendors/{vendorName}/models/{modelName}
  • 이 API는 기존 사용자 정의 모델의 정의를 검색합니다.
  • 경로 매개변수로 공급업체 이름(vendorName)과 모델 이름(modelName)이 필요합니다.
  • API는 요청된 모델을 나타내는 객체가 포함된 200 OK 응답을 반환합니다.
사용자 지정 모델 정의 업데이트 API
PUT https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel
  • 이 API는 기존 사용자 지정 모델 정의를 업데이트합니다.
    주: 이 API는 연결된 Model connections이 없는 사용자 지정 모델만 업데이트할 수 있습니다.
  • 업데이트될 모델을 식별하려면 공급업체 이름(vendorName)과 모델 이름(modelName)이 필요합니다.
  • API는 업데이트가 성공적으로 완료되면 업데이트된 모델과 함께 200 OK 응답을 반환합니다.
사용자 지정 모델 정의의 이름과 설명 업데이트 API
PATCH https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel
  • 이 API는 사용자 지정 모델 정의의 이름과 설명을 업데이트합니다.
  • 업데이트될 모델을 식별하려면 공급업체 이름(vendorName)과 모델 이름(modelName)이 필요합니다.
  • API는 성공적으로 업데이트된 모델 세부 정보와 함께 200 OK 응답을 반환합니다.
사용자 지정 모델 삭제 API
DELETE https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/vendors/{vendorName}/models/{modelName}
  • 이 API는 기존 사용자 정의 모델을 삭제합니다.
  • GET API와 유사하게, 대상 모델을 식별하기 위해 경로 매개변수로 (vendorName) 및 (modelName)을 사용합니다.
    주: 모델은 현재 활성 Model connections과 연결되어 있지 않은 경우에만 삭제할 수 있습니다. 이는 모델 정의를 삭제하려고 시도하기 전에 Model connection에 의존하는 모든 AI SkillsTask Bots를 먼저 제거해야 함을 의미합니다.
  • API는 삭제 성공 시 204 No Content 응답을 반환합니다.
사용자 지정 모델 나열 API
POST https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/list
  • 이 API는 Control Room 내의 모든 공급업체에 대해 정의된 모든 사용자 지정 모델의 목록을 검색합니다.
  • 특정 기준에 따라 결과를 필터링할 수 있도록 FilterRequest 객체를 포함하는 선택 사항 요청 본문을 허용합니다.
  • API는 요청된 모델을 포함하는 객체와 함께 200 OK 응답을 반환합니다.

위의 API에 대한 자세한 내용은 AI Agent Studio API를 참조하십시오. AI Agent Studio에 대한 Postman 컬렉션은 여기에서 다운로드할 수 있습니다. 이는 사용자 정의 모델에 연결하기 위한 예제 API 호출을 포함한 사용자 지정 모델 정의입니다.