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
API Integration
Direct REST API integration for maximum flexibility
Webhook Integration
Real-time event notifications and updates
Platform Integration
Connect with popular platforms and tools
Step-by-Step Guides
Detailed guides for different integration scenarios
Python Integration
PythonIntegrate Cashilly with your Python applications using our official SDK
Features
- SDK installation
- Authentication setup
- Project management
- Task processing
Steps
- 1Install the Cashilly Python SDK
- 2Set up authentication with API key
- 3Create your first project
- 4Process annotation tasks
- 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
JavaScriptBuild web applications and services with our JavaScript SDK
Features
- NPM package
- Promise-based API
- Browser support
- Webhook handling
Steps
- 1Install the Cashilly JavaScript SDK
- 2Configure authentication
- 3Set up project management
- 4Handle real-time updates
- 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
AnyDirect REST API integration for any programming language
Features
- HTTP requests
- JSON responses
- Authentication headers
- Error handling
Steps
- 1Set up HTTP client
- 2Configure authentication headers
- 3Make API requests
- 4Handle responses and errors
- 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
AnySet up real-time notifications for project updates and task completions
Features
- Event notifications
- Secure endpoints
- Retry mechanism
- Event filtering
Steps
- 1Create webhook endpoint
- 2Configure webhook in dashboard
- 3Handle incoming events
- 4Verify webhook signatures
- 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.jsServerless integration using AWS Lambda functions
Features
- Serverless architecture
- Event-driven processing
- Auto-scaling
- Cost optimization
Steps
- 1Set up AWS Lambda function
- 2Configure environment variables
- 3Implement Cashilly SDK
- 4Set up event triggers
- 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
DockerContainerized integration for scalable deployment
Features
- Containerization
- Environment isolation
- Scalable deployment
- CI/CD ready
Steps
- 1Create Dockerfile
- 2Configure environment variables
- 3Set up multi-stage build
- 4Deploy with Docker Compose
- 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