ProductFlo API Documentation

Welcome to the ProductFlo API documentation. ProductFlo is an AI-powered engineering platform purpose-built for hardware product development with specialized tools for mechanical, electrical, firmware, and manufacturing.

Getting Started

Core Features

API Highlights

  • RESTful Design: Consistent and intuitive API design following REST principles
  • Strong Authentication: JWT-based authentication with refresh tokens
  • Comprehensive Documentation: Detailed guides and API references
  • Websocket Support: Real-time communication for collaborative features
  • AI Integration: Powerful AI capabilities for product development
  • Multi-tenancy: Secure data isolation with tenant-specific schemas
  • Robust Error Handling: Structured error responses with clear codes
  • Rate Limiting: Fair usage policies to ensure system stability

Examples

Authentication

// Login
const response = await fetch('https://api.productflo.io/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'user@example.com', password: 'your-password' })
});

const { session } = await response.json();
const token = session.access_token;

// Authenticated request
const profileResponse = await fetch('https://api.productflo.io/profile', {
  headers: {
    'Authorization': `Bearer ${token}`,
    'X-Tenant-ID': 'tenant-123'
  }
});

WebSocket Chat

// Connect to WebSocket
const socket = new WebSocket('wss://api.productflo.io/ws?token=' + token);

// Send a message
socket.send(JSON.stringify({
  type: 'chat',
  room_id: 'conversation_123',
  data: {
    message: 'Hello team, I've updated the design.',
    sender: 'user_456'
  }
}));

// Listen for messages
socket.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Received:', data);
};

AI Image Generation

const response = await fetch('https://api.productflo.io/image-generation-openai', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'A photorealistic smart thermostat with a touch screen interface',
    nbr_images: 3
  })
});

const { generated_images } = await response.json();

Support