Integration Guides

Step-by-step integration guides for connecting Cashilly with your existing workflows, tools, and applications. Get up and running quickly with our comprehensive guides.

Integration Types

Choose the integration approach that fits your needs

SDK Integration

Use our official SDKs for the fastest integration

EasyPython, JavaScript, Go, PHP

API Integration

Direct REST API integration for maximum flexibility

MediumAny Language

Webhook Integration

Real-time event notifications and updates

MediumAny Language

Platform Integration

Connect with popular platforms and tools

EasyZapier, Make, AWS, GCP

Step-by-Step Guides

Detailed guides for different integration scenarios

Python Integration

Python

Integrate Cashilly with your Python applications using our official SDK

15 minutesBeginner

Features

  • SDK installation
  • Authentication setup
  • Project management
  • Task processing

Steps

  1. 1Install the Cashilly Python SDK
  2. 2Set up authentication with API key
  3. 3Create your first project
  4. 4Process annotation tasks
  5. 5Retrieve completed annotations

Code Example

import cashilly

# Initialize the client
client = cashilly.Client(api_key="your_api_key")

# Create a new project
project = client.projects.create(
    name="My Annotation Project",
    description="Image classification dataset",
    annotation_type="image"
)

# Get tasks for annotation
tasks = client.tasks.list(project_id=project.id, limit=10)

# Submit annotations
for task in tasks:
    annotation = client.annotations.create(
        task_id=task.id,
        annotations=[{
            "label": "cat",
            "confidence": 0.95,
            "bbox": [100, 100, 200, 200]
        }]
    )

JavaScript/Node.js Integration

JavaScript

Build web applications and services with our JavaScript SDK

20 minutesBeginner

Features

  • NPM package
  • Promise-based API
  • Browser support
  • Webhook handling

Steps

  1. 1Install the Cashilly JavaScript SDK
  2. 2Configure authentication
  3. 3Set up project management
  4. 4Handle real-time updates
  5. 5Process webhook events

Code Example

const { Cashilly } = require('@cashilly/sdk');

// Initialize the client
const client = new Cashilly({
  apiKey: 'your_api_key'
});

// Create a new project
const project = await client.projects.create({
  name: 'My Annotation Project',
  description: 'Image classification dataset',
  annotationType: 'image'
});

// Get tasks for annotation
const tasks = await client.tasks.list({
  projectId: project.id,
  limit: 10
});

// Submit annotations
for (const task of tasks) {
  const annotation = await client.annotations.create({
    taskId: task.id,
    annotations: [{
      label: 'cat',
      confidence: 0.95,
      bbox: [100, 100, 200, 200]
    }]
  });
}

REST API Integration

Any

Direct REST API integration for any programming language

30 minutesIntermediate

Features

  • HTTP requests
  • JSON responses
  • Authentication headers
  • Error handling

Steps

  1. 1Set up HTTP client
  2. 2Configure authentication headers
  3. 3Make API requests
  4. 4Handle responses and errors
  5. 5Implement retry logic

Code Example

# Example using curl
curl -X POST "https://api.cashilly.com/v1/projects" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Annotation Project",
    "description": "Image classification dataset",
    "annotation_type": "image",
    "guidelines": "Annotate objects in images"
  }'

Webhook Integration

Any

Set up real-time notifications for project updates and task completions

25 minutesIntermediate

Features

  • Event notifications
  • Secure endpoints
  • Retry mechanism
  • Event filtering

Steps

  1. 1Create webhook endpoint
  2. 2Configure webhook in dashboard
  3. 3Handle incoming events
  4. 4Verify webhook signatures
  5. 5Process event data

Code Example

// Express.js webhook handler
app.post('/webhook', express.raw({type: 'application/json'}), (req, res) => {
  const signature = req.headers['cashilly-signature'];
  const payload = req.body;
  
  // Verify webhook signature
  if (!verifySignature(payload, signature, webhookSecret)) {
    return res.status(400).send('Invalid signature');
  }
  
  const event = JSON.parse(payload);
  
  switch (event.type) {
    case 'task.completed':
      handleTaskCompleted(event.data);
      break;
    case 'project.updated':
      handleProjectUpdated(event.data);
      break;
  }
  
  res.status(200).send('OK');
});

AWS Lambda Integration

Python/Node.js

Serverless integration using AWS Lambda functions

45 minutesAdvanced

Features

  • Serverless architecture
  • Event-driven processing
  • Auto-scaling
  • Cost optimization

Steps

  1. 1Set up AWS Lambda function
  2. 2Configure environment variables
  3. 3Implement Cashilly SDK
  4. 4Set up event triggers
  5. 5Deploy and test

Code Example

import json
import cashilly
import boto3

def lambda_handler(event, context):
    # Initialize Cashilly client
    client = cashilly.Client(api_key=os.environ['CASHILLY_API_KEY'])
    
    # Process S3 event
    for record in event['Records']:
        bucket = record['s3']['bucket']['name']
        key = record['s3']['object']['key']
        
        # Create annotation project for new images
        project = client.projects.create(
            name=f"Auto-annotation-{key}",
            annotation_type="image"
        )
        
        # Add image to project
        client.tasks.create(
            project_id=project.id,
            data={"image_url": f"s3://{bucket}/{key}"}
        )
    
    return {
        'statusCode': 200,
        'body': json.dumps('Processing completed')
    }

Docker Integration

Docker

Containerized integration for scalable deployment

40 minutesAdvanced

Features

  • Containerization
  • Environment isolation
  • Scalable deployment
  • CI/CD ready

Steps

  1. 1Create Dockerfile
  2. 2Configure environment variables
  3. 3Set up multi-stage build
  4. 4Deploy with Docker Compose
  5. 5Monitor container health

Code Example

# Dockerfile
FROM python:3.9-slim

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy application code
COPY . .

# Set environment variables
ENV CASHILLY_API_KEY=your_api_key
ENV CASHILLY_ENVIRONMENT=production

# Run application
CMD ["python", "app.py"]

Best Practices

Follow these best practices for robust integrations

Error Handling

Implement robust error handling for API failures and network issues

  • Use exponential backoff for retries
  • Handle rate limiting gracefully
  • Log errors for debugging
  • Implement circuit breakers

Security

Secure your integration with proper authentication and data protection

  • Store API keys securely
  • Use environment variables
  • Validate webhook signatures
  • Implement HTTPS only

Performance

Optimize your integration for speed and efficiency

  • Use connection pooling
  • Implement caching where appropriate
  • Batch API requests when possible
  • Monitor API usage and limits

Monitoring

Monitor your integration health and performance

  • Set up logging and metrics
  • Monitor API response times
  • Track error rates
  • Set up alerts for failures

Need Help with Integration?

Our team is here to help you integrate Cashilly with your existing systems