Skip to content

thatapicompany/pet-portrait-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pet Portrait API Example

This repository contains an example integration with TheDogAPI portrait-related endpoints. It demonstrates how to automate the creation of pet profiles, upload images, and generate AI-powered artistic portraits.

πŸš€ Key Features

  • Automated Folder Discovery: Automatically processes subfolders in test-images/dogs/ as individual pets.
  • Robust Image Synchronization: Handles both new pet creation and syncing images to existing profiles.
  • Multi-Style Portraits: Generates portraits in various styles (studio, pencil_sketch, watercolour, oil_painting, july_4th).
  • Organized Outputs: Automatically categorizes analysis data and generated portraits into pet-specific subdirectories.

πŸ“‚ Project Structure

  • python/: Contains the Python implementation and its own detailed documentation.
  • test-images/: Sample images for testing the integration.
  • output-data/: Generated JSON analysis results (genealogy, BCS, etc.).
  • output-portraits/: Generated AI portraits.

πŸ› οΈ Getting Started

To explore the code and run the example, navigate to the python/ directory:

cd python

Follow the instructions in python/README.md to set up your environment and run the script.

πŸ“– API Documentation

The example interacts with the following endpoints:

  • POST /v1/pets: Create a pet profile.
  • POST /v1/pets/{id}/images: Upload images to a pet profile.
  • POST /v1/pets/{id}/portrait: Generate an AI portrait.
  • POST /v1/pets/{id}/genealogy: Analyze breed and genealogy.
  • POST /v1/pets/{id}/body-condition-score: Analyze BCS.

For more details on the API, visit TheDogAPI Documentation.

About

Example of how to use the Dog API for pet portraits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors