Skip to content
Framework Docs

List Classify Jobs

client.Classify.List(ctx, query) (*PaginatedCursor[ClassifyListResponse], error)
GET/api/v2/classify

List classify jobs with optional filtering and pagination.

Filter by status, configuration_id, specific job_ids, or creation date range.

ParametersExpand Collapse
query ClassifyListParams
ConfigurationID param.Field[string]optional

Filter by configuration ID

CreatedAtOnOrAfter param.Field[Time]optional

Include items created at or after this timestamp (inclusive)

formatdate-time
CreatedAtOnOrBefore param.Field[Time]optional

Include items created at or before this timestamp (inclusive)

formatdate-time
JobIDs param.Field[[]string]optional

Filter by specific job IDs

OrganizationID param.Field[string]optional
PageSize param.Field[int64]optional

Number of items per page

maximum100
minimum1
PageToken param.Field[string]optional

Token for pagination

ProjectID param.Field[string]optional
Status param.Field[ClassifyListParamsStatus]optional

Filter by job status

const ClassifyListParamsStatusPending ClassifyListParamsStatus = "PENDING"
const ClassifyListParamsStatusRunning ClassifyListParamsStatus = "RUNNING"
const ClassifyListParamsStatusCompleted ClassifyListParamsStatus = "COMPLETED"
const ClassifyListParamsStatusFailed ClassifyListParamsStatus = "FAILED"
ReturnsExpand Collapse
type ClassifyListResponse struct{…}

Response for a classify job.

ID string

Unique identifier

Configuration ClassifyConfiguration

Classify configuration used for this job

Rules []ClassifyConfigurationRule

Classify rules to evaluate against the document (at least one required)

Description string

Natural language criteria for matching this rule

maxLength500
minLength10
Type string

Document type to assign when rule matches

maxLength50
minLength1
Mode ClassifyConfigurationModeoptional

Classify execution mode

ParsingConfiguration ClassifyConfigurationParsingConfigurationoptional

Parsing configuration for classify jobs.

Lang stringoptional

ISO 639-1 language code for the document

MaxPages int64optional

Maximum number of pages to process. Omit for no limit.

minimum1
TargetPages stringoptional

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

DocumentInputType ClassifyListResponseDocumentInputType

Whether the input was a file or parse job (FILE or PARSE_JOB)

One of the following:
const ClassifyListResponseDocumentInputTypeURL ClassifyListResponseDocumentInputType = "url"
const ClassifyListResponseDocumentInputTypeFileID ClassifyListResponseDocumentInputType = "file_id"
const ClassifyListResponseDocumentInputTypeParseJobID ClassifyListResponseDocumentInputType = "parse_job_id"
FileInput string

ID of the input file or parse job

ProjectID string

Project this job belongs to

Status ClassifyListResponseStatus

Current job status: PENDING, RUNNING, COMPLETED, or FAILED

One of the following:
const ClassifyListResponseStatusPending ClassifyListResponseStatus = "PENDING"
const ClassifyListResponseStatusRunning ClassifyListResponseStatus = "RUNNING"
const ClassifyListResponseStatusCompleted ClassifyListResponseStatus = "COMPLETED"
const ClassifyListResponseStatusFailed ClassifyListResponseStatus = "FAILED"
UserID string

User who created this job

ConfigurationID stringoptional

Product configuration ID

CreatedAt Timeoptional

Creation datetime

formatdate-time
ErrorMessage stringoptional

Error message if job failed

ParseJobID stringoptional

Associated parse job ID

Result ClassifyResultoptional

Result of classifying a document.

Confidence float64

Confidence score between 0.0 and 1.0

maximum1
minimum0
Reasoning string

Why the document matched (or didn't match) the returned rule

Type string

Matched rule type, or null if no rule matched

TransactionID stringoptional

Idempotency key

UpdatedAt Timeoptional

Update datetime

formatdate-time

List Classify Jobs

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/llamacloud-prod-go"
  "github.com/stainless-sdks/llamacloud-prod-go/option"
)

func main() {
  client := llamacloudprod.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Classify.List(context.TODO(), llamacloudprod.ClassifyListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "rules": [
          {
            "description": "contains invoice number, line items, and total amount",
            "type": "invoice"
          }
        ],
        "mode": "FAST",
        "parsing_configuration": {
          "lang": "en",
          "max_pages": 10,
          "target_pages": "1,3,5-7"
        }
      },
      "document_input_type": "url",
      "file_input": "file_input",
      "project_id": "project_id",
      "status": "PENDING",
      "user_id": "user_id",
      "configuration_id": "configuration_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "parse_job_id": "parse_job_id",
      "result": {
        "confidence": 0,
        "reasoning": "reasoning",
        "type": "type"
      },
      "transaction_id": "transaction_id",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "rules": [
          {
            "description": "contains invoice number, line items, and total amount",
            "type": "invoice"
          }
        ],
        "mode": "FAST",
        "parsing_configuration": {
          "lang": "en",
          "max_pages": 10,
          "target_pages": "1,3,5-7"
        }
      },
      "document_input_type": "url",
      "file_input": "file_input",
      "project_id": "project_id",
      "status": "PENDING",
      "user_id": "user_id",
      "configuration_id": "configuration_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "parse_job_id": "parse_job_id",
      "result": {
        "confidence": 0,
        "reasoning": "reasoning",
        "type": "type"
      },
      "transaction_id": "transaction_id",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}