Calling a Custom Model

You can use the Console, CLI, or API to call a custom model either synchronously or asynchronously.

For sample code references, see the samples on GitHub.

  • You can call the model as a single request in the Console.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Document Understanding.
    2. On the Document Understanding page, under Custom models, click Projects.
    3. Select the compartment that contains the model, and then click the name of the project where the model is stored.
    4. On the project details page, click the name of the model that you want to call.
      The model details page for that custom model is displayed.
    5. Scroll down to the Analyze section of the page, and select one of Local File or Object Storage.
    6. Select the compartment, bucket, and prefix name of where you want the JSON results stored when processing the document
    7. After you select the document, results show up on the page and in the Object Storage bucket specified in step 5.
  • Use the processor-job command and required parameters to analyze the document asynchronously:
    oci ai-document processor-job create-processor-job-general-processor-config [OPTIONS]

    Use the analyze-document command and required parameters to analyze the document synchronously:

    oci ai-document analyze-document-result analyze-document [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the CreateProcessorJob operation to analyze a document asynchronously.

    Run the AnalyzeDocument operation to analyze a document synchronously.