Package ai.extend
Class ExtendClient
- java.lang.Object
-
- ai.extend.ExtendClientBase
-
- ai.extend.ExtendClient
-
- Direct Known Subclasses:
ExtendClientWrapper
public class ExtendClient extends ExtendClientBase
The Extend API client, with additional polling and webhook utilities.Extends the generated
ExtendClientBase, so all generated methods (parse, edit, extract, classify, split, files, extractors, classifiers, splitters, workflows, evaluation sets, etc.) are available directly.Additionally provides:
createAndPollon all run resources (extractRuns, classifyRuns, etc.)webhooks()for signature verification
Basic Usage
// Reads EXTEND_API_KEY from the environment automatically ExtendClient client = ExtendClient.builder().build(); // ...or set the key explicitly ExtendClient client = ExtendClient.builder() .apiKey("your-api-key") .build(); // Synchronous convenience methods (inherited from ExtendClientBase) ParseRun parseResult = client.parse(ParseRequest.builder().file(...).build()); ExtractRun extractResult = client.extract(ExtractRequest.builder().file(...).build()); // Create and poll an extract run ExtractRun response = client.extractRuns().createAndPoll( ExtractRunsCreateRequest.builder() .file(...) .extractor(...) .build() );Webhook Verification
Map<String, Object> event = client.webhooks().verifyAndParse( requestBody, requestHeaders, signingSecret );
-
-
Field Summary
-
Fields inherited from class ai.extend.ExtendClientBase
batchProcessorRunClient, batchRunsClient, classifiersClient, classifierVersionsClient, clientOptions, editSchemasClient, editTemplatesClient, evaluationSetItemsClient, evaluationSetRunsClient, evaluationSetsClient, extractorsClient, extractorVersionsClient, filesClient, formDetectionRunsClient, processorClient, processorRunClient, processorVersionClient, splittersClient, splitterVersionsClient, webhookEndpointsClient, webhookSubscriptionsClient, workflowsClient, workflowVersionsClient
-
-
Constructor Summary
Constructors Constructor Description ExtendClient(ClientOptions clientOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtendClientBuilderbuilder()Creates a new builder forExtendClient.ClassifyRunsClientclassifyRuns()Returns the classify runs client with createAndPoll support.EditRunsClienteditRuns()Returns the edit runs client with createAndPoll support.ExtractRunsClientextractRuns()Returns the extract runs client with createAndPoll support.ParseRunsClientparseRuns()Returns the parse runs client with createAndPoll support.SplitRunsClientsplitRuns()Returns the split runs client with createAndPoll support.Webhookswebhooks()Returns the webhook utilities for signature verification.RawExtendClientwithRawResponse()Returns the raw-response client.WorkflowRunsClientworkflowRuns()Returns the workflow runs client with createAndPoll support.-
Methods inherited from class ai.extend.ExtendClientBase
batchProcessorRun, batchRuns, classifiers, classifierVersions, classify, classify, detectForm, detectForm, edit, edit, editSchemas, editTemplates, evaluationSetItems, evaluationSetRuns, evaluationSets, extract, extract, extract, extract, extractors, extractorVersions, files, formDetectionRuns, parse, parse, processor, processorRun, processorVersion, split, split, splitters, splitterVersions, webhookEndpoints, webhookSubscriptions, workflows, workflowVersions
-
-
-
-
Constructor Detail
-
ExtendClient
public ExtendClient(ClientOptions clientOptions)
-
-
Method Detail
-
webhooks
public Webhooks webhooks()
Returns the webhook utilities for signature verification.
-
extractRuns
public ExtractRunsClient extractRuns()
Returns the extract runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
extractRunsin classExtendClientBase
-
classifyRuns
public ClassifyRunsClient classifyRuns()
Returns the classify runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
classifyRunsin classExtendClientBase
-
splitRuns
public SplitRunsClient splitRuns()
Returns the split runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
splitRunsin classExtendClientBase
-
parseRuns
public ParseRunsClient parseRuns()
Returns the parse runs client with createAndPoll support. All standard methods (create, retrieve, delete) are also available.- Overrides:
parseRunsin classExtendClientBase
-
editRuns
public EditRunsClient editRuns()
Returns the edit runs client with createAndPoll support. All standard methods (create, retrieve, delete) are also available.- Overrides:
editRunsin classExtendClientBase
-
workflowRuns
public WorkflowRunsClient workflowRuns()
Returns the workflow runs client with createAndPoll support. All standard methods (create, list, retrieve, update, delete, cancel, createBatch) are also available.- Overrides:
workflowRunsin classExtendClientBase
-
withRawResponse
public RawExtendClient withRawResponse()
Returns the raw-response client. Preserves the historicalRawExtendClientreturn type so existingRawExtendClient raw = client.withRawResponse();keeps compiling.- Overrides:
withRawResponsein classExtendClientBase
-
builder
public static ExtendClientBuilder builder()
Creates a new builder forExtendClient.
-
-