Sketch-to-Circuit AI
Transform napkin sketches into manufacturable photonic circuits in seconds
"I literally drew this on a napkin and it became a working chip"
FluxCore's Sketch-to-Circuit AI uses GPT-4 Vision to understand your hand-drawn photonic circuit sketches and convert them into fully parameterized, manufacturable designs. Draw on paper, whiteboards, tablets, or directly in the browser - our AI handles the rest.
Under 10 Seconds
From sketch upload to working circuit design
95%+ Accuracy
Component recognition and connection mapping
Production Ready
Export directly to GDS/OASIS for fabrication
How It Works
Capture Your Sketch
Draw your circuit on any medium - paper napkin, whiteboard, tablet, or directly in our browser canvas. Upload a photo or use your device camera for instant capture.
AI Analyzes Your Sketch
GPT-4 Vision processes your sketch to identify photonic components, trace signal paths, read text annotations, and understand the circuit topology.
Recognition Capabilities:
- Waveguides and routing paths
- Ring resonators and filters
- Directional couplers and splitters
- Modulators and phase shifters
- Photodetectors and sources
- Text labels and annotations
Circuit Generation
The AI generates a complete photonic circuit layout with proper routing, validated component parameters, and design rule compliance.
Generated Output Includes:
- Parameterized component instances with industry-standard defaults
- Optimized waveguide routing with minimum bend radius compliance
- Connection validation and topology verification
- Initial simulation-ready configuration
API Integration
Python SDK Example
import fluxcore
from fluxcore.ai import SketchToCircuit
# Initialize the client
client = fluxcore.Client(api_key="your-api-key")
# Create sketch converter
converter = SketchToCircuit(client)
# Option 1: Upload an image file
result = converter.from_image("sketch.jpg")
# Option 2: Capture from camera
result = converter.from_camera()
# Option 3: Use base64 encoded image
with open("sketch.png", "rb") as f:
image_data = base64.b64encode(f.read()).decode()
result = converter.from_base64(image_data)
# Access the generated circuit
circuit = result.circuit
print(f"Recognized {len(circuit.components)} components")
print(f"Found {len(circuit.connections)} connections")
# View confidence scores
for component in circuit.components:
print(f"{component.type}: {component.confidence:.2%}")
# Export to various formats
circuit.export_gds("output.gds")
circuit.export_json("output.json")
# Open in editor
circuit.open_in_editor()Pro Tip
For best results, draw components with clear separation and use arrows to indicate signal flow direction. Label critical components with text annotations.
REST API Example
# Upload sketch and convert to circuit
curl -X POST https://api.fluxcore.io/v1/ai/sketch-to-circuit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@sketch.jpg" \
-F "options={
\"target_wavelength\": 1550,
\"material_system\": \"silicon\",
\"min_feature_size\": 100,
\"optimize_routing\": true
}"
# Response
{
"circuit_id": "cir_abc123",
"components": [
{
"id": "ring_1",
"type": "ring_resonator",
"confidence": 0.97,
"parameters": {
"radius": 10.0,
"gap": 0.2,
"width": 0.45
},
"position": {"x": 100, "y": 200}
}
],
"connections": [...],
"validation": {
"drc_passed": true,
"warnings": []
}
}Recognized Component Types
Passive Components
- Straight waveguides
- Curved bends
- Directional couplers
- Y-branches
- MMI couplers
- Tapered sections
Resonant Structures
- Ring resonators
- Racetrack resonators
- Disk resonators
- Cascaded rings
- Bragg gratings
- Photonic crystals
Active Devices
- Phase modulators
- MZI switches
- Photodetectors
- Thermal heaters
- Edge couplers
- Grating couplers
Best Practices for Sketch Recognition
Drawing Tips
- Use clear, distinct shapes for each component
- Draw circles for ring resonators, not ellipses
- Use arrows to indicate input/output ports
- Add text labels for component names
- Use solid lines for waveguide connections
Image Quality
- Good lighting, minimal shadows
- High contrast (dark ink on white paper)
- Straight, non-tilted image capture
- Minimum 1000x1000 pixel resolution
- Avoid reflections on whiteboards
Try Sketch-to-Circuit Now
Experience the magic of converting your hand-drawn sketches into working photonic circuits. No sign-up required for the demo.
Next Steps
Related Features
- Real-Time Physics Simulation- See light propagate in your generated circuit
- AI Performance Prediction- Predict circuit performance before fabrication
- Voice-Controlled Design- Combine with voice for hands-free workflow
Technical Deep Dives
- REST API Reference- Complete API documentation
- Python SDK Guide- Automate sketch processing
- Export Formats- GDS, OASIS, and more