POST /applications/{applicationId}/ai-analysis
Generate AI analysis for an application
Uses Claude AI to analyze an application and provide a detailed risk assessment, focusing on business stability, financial health, industry risk factors, merchant reputation, and compliance.
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
x-account-id
header string Account ID for the request
applicationId
path string The ID of the application to analyze
Request Body
{}{}Try it out
Loading...
Output:
Responses
Description
AI analysis generated successfully
{ "timestamp": "string", "applicationId": "string", "aiAnalysis": "string", "model": "claude-3-opus-20240229"}Description
Unauthorized - User not authenticated
Description
Forbidden - User does not have permission to analyze this application
Description
Application not found
Description
Failed to perform AI analysis
{ "error": "Failed to perform AI analysis"}References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/AIAnalysis
type: objectdescription: AI-generated analysis of an applicationproperties: timestamp: type: string format: date-time description: When the analysis was generated applicationId: type: string description: ID of the analyzed application aiAnalysis: type: string description: The detailed analysis text generated by the AI model model: type: string description: The AI model used for analysis example: claude-3-opus-20240229required: - timestamp - applicationId - aiAnalysis - model|export interface AIAnalysis { /** When the analysis was generated */ timestamp: Date; /** ID of the analyzed application */ applicationId: string; /** The detailed analysis text generated by the AI model */ aiAnalysis: string; /** The AI model used for analysis */ model: string;}Route Source Code
Check out the source code for this route entrypoint here: /applications/[applicationId]/ai-analysis/route.ts
Or the swagger.yaml spec this documentation was generated from:
/applications/swagger.yaml