SDKs & Libraries

BlueNexus AI provides official SDKs for popular programming languages to make it easy to integrate with our platform.

Official SDKs

Python SDK

The official Python SDK provides a simple interface to the BlueNexus AI API.

Installation

pip install bluenexus

Quick Start

import bluenexus

# Initialize the client
client = bluenexus.Client(api_key="YOUR_API_KEY")

# Create a data record
task = client.data.create("tasks", {
    "title": "Learn AI development",
    "description": "Study machine learning concepts",
    "priority": 3
})

# Get data records
tasks = client.data.list("tasks", filters={"priority": {"$gte": 3}})

# Use LLM services
response = client.llm.create_completion(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "user", "content": "Explain quantum computing"}
    ]
)

Advanced Usage

JavaScript/Node.js SDK

The official JavaScript SDK works in both Node.js and browser environments.

Installation

Node.js Usage

Browser Usage

Go SDK

The official Go SDK provides type-safe access to the BlueNexus AI API.

Installation

Usage

Ruby SDK

The official Ruby SDK provides a Ruby-friendly interface to the BlueNexus AI API.

Installation

Usage

Community Libraries

PHP

Java

C#

SDK Features

Common Features

All official SDKs provide:

  • Type Safety: Strong typing where supported

  • Error Handling: Comprehensive error handling

  • Retry Logic: Automatic retry with exponential backoff

  • Rate Limiting: Built-in rate limit handling

  • Authentication: Multiple authentication methods

  • Documentation: Comprehensive documentation

  • Examples: Code examples and tutorials

Authentication Methods

  • API Key: Simple API key authentication

  • OAuth 2.0: Full OAuth 2.0 flow support

  • Personal Access Tokens: Long-term API access

  • JWT Tokens: JSON Web Token support

Data Operations

  • CRUD Operations: Create, read, update, delete

  • Filtering: Advanced filtering capabilities

  • Pagination: Cursor-based pagination

  • Validation: Input validation and sanitization

AI Operations

  • LLM Services: Language model completions

  • Streaming: Real-time streaming responses

  • Model Management: Model selection and configuration

  • Token Management: Automatic token counting

Configuration

Environment Variables

Client Configuration

Error Handling

Common Error Types

  • AuthenticationError: Invalid credentials

  • RateLimitError: Rate limit exceeded

  • ValidationError: Invalid input data

  • NetworkError: Network connectivity issues

  • ServerError: Server-side errors

Error Handling Example

Testing

Mock Client

Test Fixtures

Best Practices

Performance

  1. Connection Pooling: Reuse HTTP connections

  2. Batch Operations: Use batch operations when possible

  3. Caching: Cache frequently accessed data

  4. Async Operations: Use async/await for better performance

Security

  1. Environment Variables: Store API keys in environment variables

  2. Token Rotation: Regularly rotate API keys

  3. Scope Limitation: Use minimal required scopes

  4. Input Validation: Validate all inputs

Error Handling

  1. Retry Logic: Implement exponential backoff

  2. Circuit Breaker: Use circuit breaker pattern

  3. Logging: Log errors for debugging

  4. Monitoring: Monitor API usage and errors

Support

Documentation

  • API Reference: Complete API documentation

  • Code Examples: Comprehensive code examples

  • Tutorials: Step-by-step tutorials

  • Best Practices: Development best practices

Community

  • GitHub: Source code and issue tracking

  • Discord: Community support and discussions

  • Stack Overflow: Technical questions and answers

  • Blog: Latest updates and tutorials

Professional Support

  • Enterprise Support: Priority support for enterprise customers

  • Training: Custom training sessions

  • Consulting: Architecture and implementation consulting

  • SLA: Service level agreements

Last updated