.png)
Anthropic Claude API Integration Guide
Connect enterprise applications and workflows to Claude through Anthropic’s HTTPS/JSON API, asynchronous Message Batches, selective webhooks, and file capabilities.
Anthropic Claude API integration options at a glance
Anthropic Claude API is primarily an HTTPS/JSON REST API for creating Messages, streaming responses, counting tokens, discovering Models, processing Message Batches, and managing Files. API keys are supplied through the x-api-key header alongside the required anthropic-version header. Martini can consume these endpoints from workflows, expose an internal API for enterprise applications, and map business data into Claude requests and generated responses. For asynchronous workloads, Martini can submit Message Batches, persist batch identifiers, receive selected lifecycle webhooks, or poll for completion. File uploads and Claude tool-use flows can also be orchestrated where the supported use case and security controls are appropriate.
| Integration point | Supported by Anthropic Claude API? | Common use cases | How Martini supports it |
|---|---|---|---|
| REST APIs | Yes | Create Messages, stream responses, count tokens, list Models, manage Message Batches, upload Files, and access authorized administrative usage or cost APIs. | Martini can consume Anthropic HTTPS/JSON endpoints from workflows, map request and response data, and expose a controlled Martini API for calling applications. |
| Webhooks / outbound callbacks | Limited | Receive selected asynchronous notifications, particularly Message Batch lifecycle events. Webhooks are not a universal event stream for Claude activity. | Martini can expose an API or webhook-triggered workflow, verify the notification, record the event identifier, and retrieve authoritative batch status or results. |
| Bulk / async / batch APIs | Yes | Submit multiple independent Message requests through the Message Batches API for classification, summarization, enrichment, or offline analysis. | Martini can construct batch items, persist the batch identifier, orchestrate polling or webhook handling, and process successful and failed item results separately. |
| File / attachment APIs | Limited | Upload and manage files for supported Claude requests. File types, limits, retention, and use cases are governed by Anthropic’s current Files API documentation. | Martini can obtain a file from an enterprise source, upload it, correlate the returned file identifier, invoke Claude, and manage downstream cleanup or failure handling. |
| Streaming responses | Yes | Deliver incremental Message responses to interactive applications using server-sent event-style response events. | Martini can orchestrate streaming consumption where required, assemble response events, and expose a controlled API; synchronous requests or batches are usually simpler for scheduled processing. |
| Authentication | Yes | Authenticate requests with an API key in x-api-key, identify the API version with anthropic-version, and use optional anthropic-beta headers for selected capabilities. | Martini stores keys in secrets or secure environment configuration and applies required headers through REST API configuration and workflow logic. |
| Database / analytics access | Limited | Authorized organizations may access administrative usage and cost reporting APIs. Anthropic does not document direct database access for Claude API integrations. | Martini can consume reporting endpoints or independently connect to an enterprise database for orchestration and persistence, without treating Anthropic as a database endpoint. |
| SDKs | Yes | Anthropic SDKs can support language-specific custom implementations, although the portable integration boundary for Martini is the documented HTTPS API. | Martini workflows can use REST directly; JVM-compatible custom logic may be considered only where language-specific handling is necessary. |
How Anthropic Claude API exposes data and business events
Anthropic Claude API REST APIs
The Claude API is an HTTPS/JSON REST API covering Messages, streaming, token counting, Models, Message Batches, Files, and selected administrative resources. Requests generally require x-api-key and anthropic-version headers.
Martini implementation pattern
Martini implementation pattern: a workflow receives an enterprise request or scheduled item, builds the Anthropic request, calls the appropriate REST endpoint, parses the JSON response or content blocks, validates the result, and sends it to the next system or returns it through a Martini API.
Implementation sequence
Anthropic Message Batches
The Message Batches API processes multiple independent Message requests asynchronously. It is suitable for large prompt workloads where immediate synchronous responses are not required.
Martini implementation pattern
Martini implementation pattern: one workflow creates and submits the batch, stores its identifier and source-item mappings, and a second workflow responds to a supported notification or scheduled polling cycle before retrieving and processing results.
Implementation sequence
Anthropic Webhooks
Anthropic supports webhook notifications for selected asynchronous events, particularly Message Batch lifecycle events. Notifications should be treated as signals to retrieve authoritative state rather than as complete result payloads.
Martini implementation pattern
Martini implementation pattern: a Martini API receives the notification, verifies it according to Anthropic’s requirements, records the event identifier for idempotency, confirms the event and batch, and retrieves current status or results from Anthropic.
Implementation sequence
Anthropic Files API
The Files API supports uploading and managing files for supported Claude use cases and is documented as a beta capability. It is not a general-purpose file-transfer service.
Martini implementation pattern
Martini implementation pattern: a workflow retrieves an approved file, checks type and governance requirements, uploads it to Anthropic, correlates the returned file identifier with the source object, and references it in a supported Claude request.
Implementation sequence
Claude tool-use requests
Claude Messages can contain tool-use blocks and tool-result blocks. Anthropic returns the requested operation, while Martini remains responsible for authorization, validation, execution, and error handling.
Martini implementation pattern
Martini implementation pattern: a workflow submits approved tool definitions, detects a tool-use block, validates the tool and arguments, invokes the corresponding enterprise API or database operation, and sends a normalized tool result in a follow-up Messages request.
Implementation sequence
Common Anthropic Claude API integration patterns
Pattern 1: Classify and route enterprise documents
When to use this pattern
Use this pattern when documents or document references arrive from an enterprise application and need classification, extraction, summarization, or routing. Claude output should remain advisory until Martini validates required fields and business rules.
Integration direction
Example Mapping
| Anthropic Claude API Field | Canonical Field | Target Field |
|---|---|---|
| document content or file_id | sourceDocument | attachment or source reference |
| document type | classification | category |
| customer or supplier identifier | partyReference | account, customer, or supplier |
| priority | processingPriority | priority |
Martini implementation pattern
Martini receives the document, applies data-minimization and file validation rules, uploads it through the Files API when supported, and submits a structured Messages request. The workflow validates the generated fields, routes malformed output for review, and writes only approved classifications or extracted values to the target system with correlation and retry controls.
Martini capabilities used
- workflows
- API consumption
- file handling
- data mapping
- business rules
- validation
- error handling
Pattern 2: Assist customer-support responses
When to use this pattern
Use this pattern when support teams need summaries, suggested replies, classifications, or escalation recommendations without allowing generated text to bypass human approval.
Integration direction
Example Mapping
| Anthropic Claude API Field | Canonical Field | Target Field |
|---|---|---|
| case or ticket subject | caseSubject | prompt context |
| conversation history | conversationContext | prompt context |
| suggested response | draftResponse | internal draft reply |
| escalation recommendation | escalationDecision | case priority or review queue |
Martini implementation pattern
A Martini workflow retrieves the support item and relevant authorized context, removes unnecessary sensitive data, submits a bounded Messages request, and validates the response schema. Business rules determine whether the result is stored as a draft, routed for approval, or escalated; transient Anthropic failures are retried while malformed output is quarantined.
Martini capabilities used
- workflows
- API consumption
- data mapping
- business rules
- secrets management
- validation
- error handling
Pattern 3: Process large prompt workloads with Message Batches
When to use this pattern
Use this pattern for independent classification, summarization, or enrichment jobs where asynchronous processing is acceptable and holding an interactive request open is unnecessary.
Integration direction
Example Mapping
| Anthropic Claude API Field | Canonical Field | Target Field |
|---|---|---|
| source item identifier | sourceItemId | custom_id |
| source text | inputContext | Messages.messages |
| batch identifier | anthropicBatchId | processing checkpoint |
| generated result | enrichmentResult | classification or summary field |
Martini implementation pattern
A scheduled Martini workflow reads eligible items, creates independent batch requests, submits them, and persists the Anthropic batch identifier with source correlations. A webhook-triggered or scheduled recovery workflow retrieves results, validates each item, updates successful records idempotently, and records item-level failures for replay or review.
Martini capabilities used
- scheduled workflows
- API consumption
- batch orchestration
- mapping and transformation
- checkpointing
- retry handling
- monitoring
Pattern 4: Govern Claude tool use with enterprise APIs
When to use this pattern
Use this pattern when an application needs Claude to request controlled operations such as looking up a customer, checking an order, or retrieving an incident. Claude should not receive unrestricted access to enterprise systems.
Integration direction
Example Mapping
| Anthropic Claude API Field | Canonical Field | Target Field |
|---|---|---|
| tool name | requestedOperation | workflow route |
| tool arguments | validatedParameters | API query parameters |
| calling user | requesterIdentity | authorization context |
| enterprise response | toolResult | tool_result content block |
Martini implementation pattern
Martini exposes a controlled API or workflow and supplies Claude with approved tool definitions. When a tool-use block is returned, Martini validates the operation, arguments, identity, authorization, and mutation risk before invoking the target system. It normalizes the result, sends it back to Claude, and logs the decision and correlation identifiers without trusting model-generated instructions by default.
Martini capabilities used
- API exposure
- workflows
- authorization
- business rules
- API consumption
- data transformation
- audit and error handling
Applications commonly integrated with Anthropic Claude API
Claude API can be placed behind Martini workflows to add controlled language-model processing to enterprise applications. The following are practical application-level integration patterns rather than claims of native Anthropic integrations.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| Salesforce | Summarize Cases, classify Leads, draft Account or Opportunity notes, and assist service agents while keeping approval in Salesforce. | Salesforce → Martini → Anthropic Claude API → Salesforce | A Martini workflow retrieves the approved Salesforce context, applies data-minimization rules, submits a Messages request, validates the response, and writes a recommendation or draft back to Salesforce. |
| ServiceNow | Summarize Incidents, classify Requests, suggest knowledge articles, and support ticket routing. | ServiceNow → Martini → Anthropic Claude API → ServiceNow | Martini receives a ServiceNow event or scheduled work item, retrieves the required incident data, calls Claude, validates the generated classification or recommendation, and updates ServiceNow subject to business rules. |
| Zendesk | Summarize tickets, suggest replies, classify support requests, and identify escalation conditions. | Zendesk → Martini → Anthropic Claude API → Zendesk | A Martini workflow consumes Zendesk ticket data, constructs controlled context, invokes the Messages API, and returns a validated draft or classification without automatically sending consequential customer communications. |
| Slack | Provide an internal assistant, summarize channels or threads, and route approved tool requests. | Slack → Martini → Anthropic Claude API → Slack | Martini receives an approved Slack request through the relevant Slack integration, sends the normalized prompt to Claude, validates any tool-use request, and posts the resulting response or approval request back to Slack. |
| Jira | Summarize Issues, classify defects, draft comments, and assist with release or sprint analysis. | Jira → Martini → Anthropic Claude API → Jira | Martini retrieves Jira issue data, removes unnecessary sensitive fields, submits a structured Messages request, validates the output, and writes approved comments or labels back to Jira. |
| Microsoft Teams | Support internal question-answering, meeting-summary workflows, and controlled enterprise actions. | Microsoft Teams → Martini → Anthropic Claude API → Microsoft Teams | Martini receives a Teams request, gathers authorized context, invokes Claude, and returns a response or controlled action result after validating identity, tool arguments, and business permissions. |
| Snowflake | Enrich or summarize governed datasets and generate controlled natural-language explanations of analytical results. | Snowflake → Martini → Anthropic Claude API → Snowflake | A Martini workflow reads an approved dataset or query result, applies field-level governance, sends a bounded prompt to Claude, validates the generated summary, and stores or publishes the result for authorized consumers. |
| NetSuite | Classify transaction-related documents, summarize customer or vendor activity, and support finance operations. | NetSuite → Martini → Anthropic Claude API → NetSuite | Martini retrieves a NetSuite document or transaction context, optionally uploads a supported file to Anthropic, invokes Claude, validates extracted fields, and routes the result to NetSuite or a review queue. |
How to build a Anthropic Claude API integration in Martini
Objective
Establish the Anthropic API boundary and keep credentials, model settings, and feature flags outside workflow code.
Instructions in Martini
- Configure the Anthropic HTTPS base URL and required endpoints
- Store the API key in Martini secrets or secure environment configuration
- Apply x-api-key and anthropic-version headers
- Keep model identifiers and optional beta headers configurable
Objective
Select a synchronous API request, scheduled workflow, Message Batch process, or supported webhook based on latency and workload requirements.
Instructions in Martini
- Use an API-triggered workflow for interactive requests
- Use a scheduler for queued or periodic work
- Use Message Batches for independent high-volume items
- Use a webhook-triggered workflow only for documented asynchronous events
- Retain polling as a recovery path where appropriate
Objective
Gather only the enterprise data and files required for the Claude request, with correlation identifiers and governance controls.
Instructions in Martini
- Retrieve source data from the originating application or database
- Check authorization, sensitivity, file type, and size rules
- Create a stable source-item correlation identifier
- Upload files only when the supported Files API use case applies
Objective
Coordinate Anthropic requests, content-block handling, tool execution, and downstream processing in a maintainable Martini workflow.
Instructions in Martini
- Build the Messages or Message Batch request
- Call Anthropic through the REST API
- Handle streaming assembly only when interactive incremental output is required
- Detect tool-use blocks and route them to controlled workflows
- Persist batch identifiers and processing checkpoints
Objective
Convert enterprise fields to Anthropic request structures and validate generated output before it reaches a system of record.
Instructions in Martini
- Map business context into Messages, content blocks, or batch items
- Set explicit token and output budgets
- Parse JSON and content blocks defensively
- Validate required fields, types, enumerations, and ranges
- Separate generated suggestions from trusted source-system values
Objective
Enforce data governance, authorization, model selection, approval, and mutation policies around Claude output and tool requests.
Instructions in Martini
- Mask or omit restricted data according to policy
- Allow only approved models and tools
- Validate tool arguments and caller permissions
- Require human approval for consequential actions where appropriate
- Reject or route malformed or unsafe output for review
Common Anthropic Claude API data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| Messages | Send prompts, system instructions, conversation context, tools, and content blocks to Claude and receive generated responses. | Salesforce, ServiceNow, Zendesk, Slack, Microsoft Teams, Jira, internal APIs | Martini maps enterprise context into a Messages request, applies token and data-governance rules, parses content blocks, validates output, and persists correlation and usage metadata where permitted. |
| Message Batches | Process many independent Message requests asynchronously for classification, summarization, enrichment, or offline analysis. | Databases, Salesforce, ServiceNow, Snowflake, content repositories | Martini builds batch items, stores the batch identifier, receives selected lifecycle notifications or polls, retrieves results, and handles item-level failures idempotently. |
| Models | Discover available Claude model identifiers and metadata instead of hard-coding model information where appropriate. | Configuration stores, model-selection workflows, governance services | Martini can retrieve and cache model metadata, apply approved-model business rules, and keep model selection in environment configuration. |
| Files | Upload and manage supported files for use with supported Claude requests; the capability is documented as beta. | Document repositories, NetSuite, Salesforce, ServiceNow, file storage systems | Martini correlates source files with Anthropic file identifiers, uploads only permitted content, references the identifier in a Claude request, and handles retention and cleanup policies. |
| Content blocks | Represent structured request and response components such as text, images, tool-use blocks, and tool-result blocks. | Enterprise APIs, workflow services, databases, user-facing applications | Martini parses and validates block types, routes tool-use blocks to controlled workflows, and converts generated content into approved target structures. |
| Usage and cost reports | Support authorized administrative reporting on organization usage and cost information. | Finance platforms, data warehouses, monitoring and governance stores | Martini can retrieve permitted reporting data, normalize it for internal reporting, and apply access controls and retention policies. |
Authentication and security considerations
API keys and headers
Anthropic requests generally use an API key in the x-api-key header and require the anthropic-version header. Optional anthropic-beta headers apply only to selected capabilities.
Secrets and access control
Store API keys, model settings, and feature flags in Martini secrets or secure environment configuration rather than embedding them in workflows. Use separate credentials and approved models for environments and workloads where required.
Data governance
- Minimize customer, employee, financial, and operational data sent to Claude.
- Define prompt, output, file-retention, and logging policies.
- Validate generated content before writing system-of-record data.
- Restrict tool-use operations by identity, authorization, parameter, and mutation risk.
Operational considerations for Anthropic Claude API integrations
Capacity and token budgets
Anthropic rate limits and capacity vary by organization and model. Use controlled concurrency, explicit max_tokens values, throttling, and exponential backoff for transient failures.
Pagination and idempotency
Models, Files, and Message Batches may be paginated. Follow documented pagination fields and store source identifiers, batch identifiers, webhook event identifiers, processing status, and attempt counts to make replays safe.
Validation and schema change
Validate generated content, content-block types, required fields, and enumerations before downstream updates. Keep model identifiers and beta headers configurable because model capabilities and response structures can change.
Streaming and asynchronous processing
Streaming requires event assembly, connection-duration controls, and partial-response handling. For scheduled or large workloads, Message Batches and asynchronous Martini workflows are often easier to operate.
Testing and monitoring
- Test authentication failures, rate limits, timeouts, token-limit errors, unsupported files, malformed output, and batch item failures.
- Monitor request correlation, latency, token usage, batch status, retries, and webhook verification failures.
- Define recovery workflows for missed notifications and partially completed file or batch operations.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration across enterprise systems
Scripts can call Claude, but Martini provides a maintainable workflow boundary for collecting context, invoking Anthropic, validating output, applying business rules, and updating multiple target systems.
Reusable APIs and workflows
Martini can expose a controlled API for applications that need Claude processing and can reuse workflow logic for synchronous requests, scheduled jobs, batch result handling, and tool execution.
Reliable operations
Centralized mappings, secure configuration, checkpoints, retries, idempotency, validation, and monitoring reduce the operational risks of point-to-point model calls.
Controlled tool use
Martini can act as the policy and orchestration boundary between Claude and enterprise APIs or databases, ensuring that model-generated tool requests are authenticated, authorized, validated, and auditable before execution.
Frequently asked questions
Claude API integrates primarily through Anthropic’s HTTPS/JSON REST API. Enterprise workflows can create Messages, stream responses, count tokens, discover Models, submit Message Batches, upload supported Files, and access authorized administrative reporting APIs. Selected asynchronous operations can also produce webhook notifications.
Yes. Martini can consume Anthropic’s REST endpoints, store API keys securely, map enterprise data into Messages or Message Batches, process content blocks, receive selected webhook notifications, and orchestrate controlled tool-use workflows. No native Martini connector is verified in the supplied research.
No. A dedicated Anthropic connector is not required. Martini can integrate using Anthropic’s native REST API, API-key authentication, selected webhooks, Message Batches, Files API, and documented HTTPS endpoints.
Lonti does not charge an additional per-connector or per-vendor fee to integrate Anthropic Claude API. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Anthropic, cloud infrastructure, or other third-party systems based on subscription, usage, and deployment model.
The recommended boundary is Anthropic’s REST API, including the Messages API for synchronous processing and Message Batches for independent asynchronous workloads. Selective webhooks can notify Martini about documented batch lifecycle events, while the Files API can be used for supported file scenarios. Anthropic GraphQL and SOAP APIs were not confirmed.
Webhook support is selective rather than universal. It is primarily relevant to asynchronous events such as Message Batch lifecycle notifications. Martini should verify notifications, deduplicate event identifiers, retrieve authoritative state from Anthropic, and retain scheduled polling as a recovery option.
Martini can use synchronous workflows for immediate responses or persist Message Batch identifiers and source-item correlations for asynchronous processing. Results are retrieved after completion, validated, mapped to target fields, and written idempotently. Checkpoints, event identifiers, retries, and item-level failure states help prevent duplicate updates.
Claude output should be treated as generated and untrusted until Martini validates its structure, values, authorization context, and business implications. Martini can distinguish transient rate limits, timeouts, and network failures from permanent request errors, apply controlled backoff, quarantine malformed output, and validate every tool name and argument before invoking an enterprise operation.
Related Martini documentation
Martini APIs
Data handling
Operations
Integrate Anthropic Claude API with Martini
Use Martini to build governed Claude API workflows for synchronous requests, asynchronous Message Batches, document processing, support assistance, and controlled enterprise tool use.