Ellipse Gradient for Header

Together AI Integration Guide

Connect enterprise applications to Together AI through JSON-based REST APIs, asynchronous batch operations, selected webhooks, and secure API-key authentication.

Together AI integration options at a glance

Together AI provides a JSON-over-HTTPS REST API for model discovery, chat completions, text completions, embeddings, image generation, files, fine-tuning, and batch inference. API-key authentication uses a Bearer token, which Martini can store in secure environment configuration. For asynchronous workloads, Together AI supports batch processing and webhook-style notifications for selected operations, particularly fine-tuning events. Martini can submit requests, transform payloads, persist job identifiers, poll status, receive supported callbacks, validate generated output, and write results to applications or databases. File operations are available for selected training and batch workflows rather than as a general-purpose attachment service.

Integration pointSupported by Together AI?Common use casesHow Martini supports it
REST APIsYesTogether AI's primary integration surface supports models, chat completions, text completions, embeddings, image generation, files, fine-tuning, batch operations, and job status retrieval.Martini can consume the documented JSON REST endpoints, map request payloads, transform responses, apply validation, and expose reusable APIs or workflows.
Webhooks / outbound callbacksLimitedTogether AI documents webhook-style notifications for selected asynchronous operations, particularly fine-tuning job events.Martini can expose a receiving API or webhook-triggered workflow, validate callback payloads, deduplicate notifications, and start downstream processing.
Bulk / async / batch APIsYesBatch inference processes multiple inference requests asynchronously for classification, summarization, embeddings, evaluation, and other offline workloads.Martini can prepare and validate batches, submit them, persist batch identifiers, poll status or process supported callbacks, and retrieve correlated results.
File / attachment APIsLimitedFile operations support selected workflows such as uploading training data and referencing files from fine-tuning or batch requests.Martini can transfer or prepare files, store Together AI file identifiers, associate them with jobs, and handle operation-specific status or errors.
AuthenticationYesTogether AI uses an API key supplied as a Bearer token in the HTTP Authorization header.Martini can store the key in secrets or secure environment configuration and inject it into outbound REST requests without embedding it in workflow definitions.
SDKsYesTogether AI documents Python and TypeScript or JavaScript client usage patterns for common API operations.Martini can generally call the underlying REST endpoints directly; custom JVM-compatible logic can be used only when endpoint orchestration requires it.
Database accessNot confirmedTogether AI does not expose a conventional SQL database interface for application integration.Martini can persist job state, prompts, metadata, and results in a separate supported SQL database connected to the workflow.

How Together AI exposes data and business events

Together AI REST APIs

Together AI's primary integration surface is a JSON-over-HTTPS REST API covering model discovery, inference, embeddings, image generation, files, fine-tuning, batch operations, and status retrieval.

Martini implementation pattern

Martini workflows call the documented Together AI endpoint, inject the API key from secure configuration, map source data into the operation-specific request, validate the response, and send the normalized result to another application or database.

Implementation sequence

Receive or retrieve the source data
Select the configured Together AI operation and model
Build and send the JSON request with the Bearer token
Validate and transform the response
Write the result or route validation failures for review

Together AI Webhooks

Together AI supports webhook-style notifications for selected asynchronous operations, especially fine-tuning events; coverage is not universal across all resources or inference requests.

Martini implementation pattern

Martini exposes a controlled receiving API or webhook-triggered workflow for supported callbacks, verifies the callback according to the deployed design, correlates the event with a stored job, and starts completion or failure processing.

Implementation sequence

Receive the Together AI callback
Validate the event and correlate its job identifier
Load the current job state when required
Apply idempotency and status-transition rules
Notify the target system or schedule a recovery action

Together AI Batch Inference

Together AI provides batch inference for submitting multiple requests for asynchronous processing when immediate responses are not required.

Martini implementation pattern

Martini reads unprocessed items, creates stable request identifiers, submits a batch, stores the returned identifier, and uses polling or a supported callback to retrieve and correlate results.

Implementation sequence

Read and validate unprocessed source items
Create stable request identifiers
Submit the batch to Together AI
Persist the batch identifier and checkpoint
Poll for completion or process a supported callback
Retrieve results and update downstream records

Together AI Files and Fine-tuning

Together AI provides file operations for selected workflows such as training-data upload and fine-tuning; these operations should not be treated as a general document-management service.

Martini implementation pattern

Martini obtains approved training data from a repository or database, prepares the required file representation, uploads it, associates the returned identifier with a fine-tuning job, and monitors the asynchronous result.

Implementation sequence

Retrieve approved training data
Transform and validate the training file
Upload the file to Together AI
Persist the file and job identifiers
Monitor the fine-tuning status
Publish completion or failure to the governance system

Common Together AI integration patterns

Pattern 1: Summarize support cases

When to use this pattern

Use this pattern when customer-support teams need consistent summaries, classifications, sentiment, or extracted fields without embedding model-specific logic in the support application.

Integration direction
Salesforce
Martini
Together AI
Salesforce
Example Mapping
Together AI FieldCanonical FieldTarget Field
Case.Subjectcase_subjectprompt.context.subject
Case.Descriptioncase_descriptionprompt.context.description
Generated summarycase_summaryCase.AI_Summary__c
Generated classificationcase_classificationCase.AI_Category__c
Martini implementation pattern

Martini receives a case through an API or scheduled process, removes unnecessary sensitive data, builds a structured chat-completion request, validates the generated JSON, and updates Salesforce. The workflow should fail fast on invalid payloads and use bounded retries for timeouts and rate limits.

Martini capabilities used
  • workflows
  • API consumption
  • data mapping
  • business rules
  • response validation
  • error handling

Pattern 2: Generate embeddings for documents

When to use this pattern

Use this pattern when an organization needs semantic search, document matching, retrieval augmentation, or classification based on content stored outside Together AI.

Integration direction
Document application
Martini
Together AI
Vector database
Example Mapping
Together AI FieldCanonical FieldTarget Field
Document bodydocument_textembedding.input
Document identifiersource_idvector_metadata.source_id
Together AI embeddingembedding_vectorvector.value
Document versionsource_versionvector_metadata.version
Martini implementation pattern

Martini retrieves new or changed documents, performs deterministic chunking, submits embedding requests, and stores vectors with source metadata in an external vector-capable platform. Stable document and chunk keys prevent duplicate writes, while failed chunks are retried independently where appropriate.

Martini capabilities used
  • scheduled workflows
  • API consumption
  • data transformation
  • mapping
  • database integration
  • idempotency
  • error handling

Pattern 3: Orchestrate fine-tuning jobs

When to use this pattern

Use this pattern when approved training examples must be prepared, submitted, monitored, and reported through a repeatable model-governance process.

Integration direction
Training repository
Martini
Together AI
Model-governance system
Example Mapping
Together AI FieldCanonical FieldTarget Field
Training examplestraining_datauploaded_file
Base modelbase_modelfine_tuning.base_model
Together AI job identifierjob_idgovernance.job_id
Job statusjob_statusgovernance.status
Martini implementation pattern

A Martini workflow validates training data, uploads the file, creates a fine-tuning job, and stores identifiers before monitoring begins. A webhook for supported events or a scheduled polling workflow updates governance systems; idempotency checks prevent duplicate job creation.

Martini capabilities used
  • workflows
  • file handling
  • API consumption
  • mapping
  • scheduled execution
  • webhook reception
  • business rules
  • retry handling

Pattern 4: Run batch inference for offline enrichment

When to use this pattern

Use this pattern for periodic classification, summarization, evaluation, or embedding workloads where asynchronous processing is preferable to one synchronous request per source item.

Integration direction
Database
Martini
Together AI
Database
Example Mapping
Together AI FieldCanonical FieldTarget Field
Source textinput_textbatch_request.input
Source identifiersource_idbatch_request.custom_id
Batch identifierbatch_idprocessing_checkpoint.batch_id
Generated resultinference_resultenrichment.result
Martini implementation pattern

Martini selects unprocessed rows, creates stable request identifiers, submits a Together AI batch, and persists the checkpoint. A scheduled workflow or supported callback retrieves results, correlates them to source items, validates output, and marks only successfully processed items complete.

Martini capabilities used
  • scheduled workflows
  • batch orchestration
  • API consumption
  • data mapping
  • SQL integration
  • checkpointing
  • idempotency
  • error handling

Applications commonly integrated with Together AI

Together AI can be introduced into existing application and data workflows without moving business logic into each consuming system. These are practical enterprise architecture patterns; they do not imply a native Together AI integration supplied by the named application.

Application Scenario Direction Martini Pattern
Salesforce Summarize Cases, classify Leads, draft account notes, or enrich Opportunity data using model inference. Salesforce → Martini → Together AI → Salesforce Martini receives selected Salesforce data, constructs a controlled chat-completion request, validates the response, and writes approved summaries or classifications back through the relevant Salesforce API.
ServiceNow Summarize incidents, classify requests, recommend knowledge content, or assist with ticket routing. ServiceNow → Martini → Together AI → ServiceNow A Martini workflow retrieves incident or request data, applies prompt and privacy rules, calls Together AI, validates the generated result, and updates ServiceNow or routes the item for review.
Zendesk Generate ticket summaries, classify support requests, and suggest responses for agents. Zendesk → Martini → Together AI → Zendesk Martini consumes ticket events or scheduled extracts, maps conversation history into a Together AI request, checks output structure, and stores the result as a ticket field, comment, or review task.
Slack Summarize selected messages or workflow events and post the result to a channel or workflow. Slack → Martini → Together AI → Slack Martini receives an approved Slack event, removes sensitive content according to business rules, calls a Together AI inference endpoint, and posts a concise validated response to the appropriate Slack destination.
Snowflake Process analytical records or documents for classification, summarization, enrichment, or embedding generation. Snowflake → Martini → Together AI → Snowflake Martini reads eligible rows through a database integration, chunks or batches the input, submits synchronous or batch requests to Together AI, correlates results, and writes enriched data back to Snowflake.
Datadog Summarize selected alerts and incident context or monitor model-processing failures and latency. Datadog → Martini → Together AI → Datadog Martini retrieves approved alert context, sends it to Together AI for summarization, and publishes validated operational results or workflow failure metrics to Datadog.
Shopify Classify product descriptions, generate catalog content, or enrich support and order workflows. Shopify → Martini → Together AI → Shopify Martini receives product or order data, applies field-level rules and content constraints, calls Together AI, validates the generated content, and updates Shopify only after policy checks pass.
Jira Summarize issues, classify work items, or generate release-note inputs from issue data. Jira → Martini → Together AI → Jira A Martini workflow retrieves Jira issue information, creates a structured inference request, validates the response, and writes summaries or classifications to Jira with correlation and retry handling.

How to build a Together AI integration in Martini

Objective

Configure Together AI access without placing credentials in workflow definitions.

Instructions in Martini

  • Create or obtain a Together AI API key with appropriate account permissions.
  • Store the key in Martini secrets or secure environment configuration.
  • Configure the REST request to send the key as a Bearer token.
  • Use separate configuration for development, testing, and production where appropriate.

Objective

Select an invocation model that matches the workload and latency requirements.

Instructions in Martini

  • Use an API or application event for interactive inference.
  • Use a scheduler for polling jobs, periodic enrichment, or batch submission.
  • Use a receiving API or webhook-triggered workflow for supported Together AI callbacks.
  • Use a database or file trigger when source items are maintained externally.

Objective

Collect and prepare the source content before calling Together AI.

Instructions in Martini

  • Retrieve the case, document, training examples, or source rows.
  • Remove unnecessary personal or confidential information.
  • Apply chunking, truncation, or batching for large inputs.
  • Create stable correlation identifiers for asynchronous operations.

Objective

Coordinate the Together AI request, asynchronous state, and downstream actions.

Instructions in Martini

  • Call the documented Together AI REST endpoint.
  • Persist fine-tuning or batch identifiers before monitoring.
  • Poll status on a bounded schedule or process supported callbacks.
  • Separate submission, monitoring, and result-processing workflows when useful.

Objective

Convert between application schemas and Together AI payloads while treating generated output as untrusted data.

Instructions in Martini

  • Map source fields into the operation-specific JSON request.
  • Keep model names and parameters configurable by environment.
  • Validate required response fields and structured output.
  • Route malformed, empty, truncated, or policy-sensitive output for review.

Objective

Enforce business, privacy, and processing controls around model usage.

Instructions in Martini

  • Apply eligibility and data-minimization rules before submission.
  • Prevent duplicate asynchronous jobs with stored identifiers and status checks.
  • Limit concurrency and use batch processing for suitable workloads.
  • Fail fast on authentication, model, payload, or context-length errors.

Common Together AI data objects used in integrations

ObjectTypical UseCommon target systemsMartini handling
ModelsIdentify available inference or embedding models and select a model for a request.Application configuration stores, databases, Salesforce, ServiceNowMartini retrieves or references model identifiers, keeps environment-specific selections configurable, and validates that requested models and parameters are appropriate.
Chat completionsGenerate conversational responses, summaries, classifications, extraction results, or agent-oriented output.Salesforce, ServiceNow, Zendesk, Slack, JiraMartini maps messages and business context into JSON requests, validates generated output, applies content and privacy rules, and writes approved results downstream.
CompletionsGenerate text from a prompt for applications using completion-style interactions.Content applications, databases, Shopify, internal APIsMartini constructs prompt requests, enforces payload and model rules, handles transient failures, and transforms returned text into the target schema.
EmbeddingsConvert text into vector representations for semantic search, matching, retrieval, and classification.Vector-capable data platforms, Snowflake, document applicationsMartini chunks source text deterministically, submits embedding requests, correlates vectors with source metadata, and stores them in an external persistence layer.
Fine-tuning jobsRepresent asynchronous model customization using training files, base models, hyperparameters, status, and results.Model-governance systems, databases, operations platformsMartini uploads approved files, creates jobs, persists job identifiers, receives supported notifications or polls status, and routes completion or failure outcomes.
Batch jobsRepresent asynchronous processing of multiple inference requests.Databases, data warehouses, file repositories, analytics applicationsMartini submits validated batches, stores checkpoints and batch identifiers, retrieves results, correlates them to source items, and handles retries or duplicate completion events.

Authentication and security considerations

API-key authentication

Together AI uses an API key as a Bearer token in the HTTP Authorization header. Martini should keep the key in secrets management or secure environment configuration rather than in workflow definitions.

Prompt and response protection

  • Minimize personal, confidential, and unnecessary data sent to external model infrastructure.
  • Treat generated responses as untrusted external data and validate them before downstream use.
  • Restrict access to Martini APIs and workflows that can submit prompts or retrieve generated content.
  • Define logging and retention rules so prompts and responses are not unintentionally exposed.

Operational considerations for Together AI integrations

Throughput and rate limits

Together AI limits can vary by account, model, endpoint, and subscription. Handle HTTP 429 responses with bounded retries and backoff, and avoid unbounded parallel execution.

Asynchronous state

Persist fine-tuning and batch identifiers before retrying or monitoring. Treat callbacks as potentially duplicated and use idempotency checks, while polling workflows should have defined intervals and timeouts.

Payloads and schemas

Apply chunking, truncation, or batch processing for large prompts and documents. Validate model responses, keep model parameters configurable, and test for changes in model identifiers, context limits, response fields, and supported parameters.

Observability

Record correlation identifiers, operation status, retry outcomes, and actionable error details without logging secrets or unnecessary prompt content.

Why use Martini instead of scripts or point-to-point integrations?

Centralized orchestration

Martini keeps Together AI calls, application APIs, databases, files, schedules, callbacks, and business rules in maintainable workflows instead of distributing model-specific code across applications.

Controlled data movement

Reusable mappings and validation logic can standardize prompts, responses, identifiers, privacy rules, and downstream writes across multiple consumers.

Reliable asynchronous processing

Martini can separate submission from monitoring, persist job checkpoints, receive supported callbacks, poll when necessary, and apply bounded retries and duplicate protection.

Reusable API assets

Martini can expose a controlled API façade that hides Together AI credentials, normalizes model operations, and gives consuming applications a stable contract while implementation details evolve.

Frequently asked questions

How can Together AI be integrated with enterprise systems?

Together AI can be integrated through its JSON-over-HTTPS REST API for models, chat completions, completions, embeddings, image generation, files, fine-tuning, and batch inference. Selected asynchronous operations also support webhook-style notifications. Enterprise workflows can use API-key authentication, scheduled polling, file processing, and external databases for state and results.

Can Martini integrate with Together AI?

Yes. Martini can consume Together AI REST endpoints, store the API key securely, map application data into inference or job requests, validate generated responses, submit batch and fine-tuning operations, poll status, and receive supported webhook notifications.

Do I need a connector to integrate Together AI with Martini?

No. A dedicated Together AI connector is not required. Martini can integrate using Together AI's documented REST API, API-key authentication, selected webhook mechanisms, file operations, and batch or asynchronous endpoints.

Is there any extra Lonti cost to integrate Together AI with Martini?

Lonti does not charge an additional per-connector or per-vendor fee to integrate Together AI. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Together AI, cloud infrastructure, or other third-party systems based on subscription, usage, and deployment model.

Which Together AI integration methods should architects use?

The REST API is the primary method for current integrations. Use synchronous inference for interactive workloads, batch inference for larger offline collections, file operations for supported training workflows, and selected webhooks or polling for asynchronous job status. Together AI does not have confirmed official GraphQL or SOAP support in the supplied research.

Does Together AI provide webhooks or callbacks for asynchronous work?

Together AI documents webhook-style notifications for selected asynchronous operations, particularly fine-tuning events. Coverage should not be assumed for every API resource or inference request. Martini can receive supported callbacks and can also use scheduled polling for fine-tuning and batch-job status.

How does synchronization with Together AI work?

Together AI is primarily an inference and model-operation platform rather than a system of continuously changing business records. Martini can implement synchronization through job identifiers, batch checkpoints, webhook notifications, scheduled polling, and result correlation. State and processed-item markers should be maintained in an external database or application.

How does Martini handle model output, errors, and duplicate processing?

Martini can map and transform requests and responses, validate structured output, apply business rules, and route malformed results for review. Workflows can use bounded retries with backoff for transient failures and rate limits, while authentication and validation errors generally fail fast. Stable correlation keys and persisted job identifiers help prevent duplicate writes and jobs.