API Overview
Gumnut provides a comprehensive REST API that gives you full programmatic access to all platform features. Our API follows RESTful principles and supports the OpenAPI specification, making it easy to integrate with any language or framework.OpenAPI Specification
Gumnut supports the OpenAPI 3.0 specification, providing machine-readable API documentation that can be used to:- Generate client libraries automatically
- Import into API testing tools like Postman or Insomnia
- Create mock servers for testing
- Generate comprehensive documentation
Base URL
All API requests should be made to:API Resources
The Gumnut API provides access to the following resources:Assets
Manage photos and videos in your library:- Upload new assets with metadata
- Query and filter your asset collection
- Update asset information
- Delete unwanted assets
- Generate and retrieve thumbnails
POST /api/assets
- Upload a new assetGET /api/assets
- List assets with filteringGET /api/assets/{id}
- Get specific asset detailsPATCH /api/assets/{id}
- Update asset detailsDELETE /api/assets/{id}
- Delete an asset
Albums
Organize your assets into collections:- Create and manage albums
- Add or remove assets from albums
- Share albums (coming soon)
- Set album covers and descriptions
POST /api/albums
- Create a new albumGET /api/albums
- List all albumsPATCH /api/albums/{id}
- Update album metadataDELETE /api/albums/{id}
- Delete an albumPOST /api/albums/{id}/assets
- Add assets to album
Libraries
Manage separate photo libraries:- Create multiple libraries for organization
- Set library-specific settings
- Control access permissions
GET /api/libraries
- List user librariesPOST /api/libraries
- Create a new libraryPATCH /api/libraries/{id}
- Update library settings
People & Faces
AI-powered facial recognition and grouping:- Automatic face detection in photos
- Group similar faces into people
- Name and manage recognized people
- Search assets by people
GET /api/people
- List recognized peoplePOST /api/people
- Create a person recordGET /api/faces
- Get detected faces
Search
Powerful search capabilities:- Semantic search using natural language
- Filter by metadata (date, location, camera)
- Search by detected objects and scenes
- Find similar images
POST /api/search/assets
- Search for assetsPOST /api/search/albums
- Search for albumsPOST /api/search/people
- Search for people
API Keys
Manage authentication:- Create and revoke API keys
- Set permissions and scopes
GET /api-keys/
- List API keysPOST /api-keys/
- Create new API keyDELETE /api-keys/{id}
- Revoke API key
Request Format
Headers
All requests should include:multipart/form-data
:
Request Body
Send JSON payloads for most endpoints:Query Parameters
Use query parameters for filtering and pagination:Response Format
Successful Responses
Successful requests return JSON with appropriate HTTP status codes:200 OK
- Request succeeded201 Created
- Resource created204 No Content
- Request succeeded with no content
Error Responses
Errors return consistent JSON structure:400 Bad Request
- Invalid request401 Unauthorized
- Authentication required403 Forbidden
- Insufficient permissions404 Not Found
- Resource not found429 Too Many Requests
- Rate limit exceeded500 Internal Server Error
- Server error
Pagination
List endpoints support pagination usinglimit
and offset
:
Rate Limiting
API requests are rate limited to ensure fair usage:- Default limit: 1000 requests per hour
- Burst limit: 100 requests per minute
- Upload limit: 100 uploads per hour
429
response:
Filtering & Sorting
Most list endpoints support filtering and sorting:Filtering
Use query parameters to filter results:Sorting
Control result ordering withorder_by
:
Webhooks
Get real-time updates about events in your account. See the Webhooks documentation for details.Versioning
The API does not currently support versioning.Best Practices
Efficiency
- Use batch operations when available
- Cache responses when appropriate
- Implement pagination for large datasets
- Use webhooks instead of polling
Error Handling
- Implement exponential backoff for retries
- Handle rate limits gracefully
- Log errors for debugging
- Validate input before sending requests
Security
- Never expose API keys in client-side code
- Use HTTPS for all requests
- Validate webhook signatures
- Implement proper authentication flows
Support
Need help with the API?- Check the API Reference tab for detailed endpoint documentation
- Review our Authentication guide
- Visit www.gumnut.ai/support
- Report issues or request features