Skip to main content

API Enhancements: Sub-IDs, Localization, and Health Tips

· 2 min read
Aden Forshaw
Founder/CEO of ThatAPICompany

We're constantly working to make The Dog API more robust and easier to integrate into your applications. Today, we're excited to announce a series of quality-of-life API enhancements that give you more control over your data and provide richer content for your users.

Here's a breakdown of the new features available now:

🏷️ Organizing Pets with Sub-IDs

Managing pets created by different users within your application just got a lot easier. We've introduced the sub_id field to the Pets API!

When creating or updating a pet, you can now pass a string to the sub_id field (such as your internal user ID). You can then filter the list of pets by this sub_id, making it incredibly simple to isolate and retrieve only the pets belonging to a specific user in your system.

# Creating a pet with a sub_id
curl -X POST -H "x-api-key: YOUR-API-KEY" \
-F "name=Rex" \
-F "sub_id=user-98765" \
https://api.thedogapi.com/v1/pets

# Retrieving pets for a specific user
curl -H "x-api-key: YOUR-API-KEY" \
"https://api.thedogapi.com/v1/pets?sub_id=user-98765"

🇬🇧 British English (en-gb) Localization

We're expanding our internationalization support! By popular demand, we have fully translated our extensive database of dog (and cat!) facts into British English (en-gb).

You can now specify your preferred locale when requesting facts, ensuring that the spelling and terminology feel natural to your UK audience (expect to see "colours" instead of "colors", and "behaviour" instead of "behavior"!).

💡 Categorized Health Tips

Providing actionable and personalized advice is a great way to engage your users. We've completely revamped our Health Tips feature.

Health tips are now strictly categorized, making it easier to query specific types of advice—whether it's regarding nutrition, exercise, grooming, or preventative care. These tips have been enriched to provide deeper, more personalized guidance based on a dog's specific physical characteristics and breed.

🌟 Breed Pro Features

For our Premium tier users, we've unlocked a new set of "Breed Pro" features. These endpoints return highly detailed, structured schemas containing extensive breed information that goes far beyond the standard physical traits.

These enhancements are available immediately across all supported endpoints. We hope these updates make building with The Dog API an even better experience!

Introducing Pet Portraits: Turn Photos into Masterpieces

· 3 min read
Aden Forshaw
Founder/CEO of ThatAPICompany

We are thrilled to announce a brand-new feature to The Dog API: Pet Portraits.

You can now use our API endpoints to transform regular photos of dogs into beautiful, stylized portraits. Whether you're building a pet profile app or just want to offer a fun feature for your users, our new portrait generation endpoints make it seamless to create stunning artwork from uploaded images.

🎨 Available Styles

Our portrait generation supports several distinct artistic styles. Here’s a look at what you can create, using a beautiful Border Collie as our model!

Studio

Create a clean, professional-looking headshot with beautiful lighting:

Border Collie Studio Portrait

Watercolour

Transform the photo into a delicate and vibrant watercolour painting:

Border Collie Watercolour Portrait

Pencil Sketch

Give the image a classic, hand-drawn pencil sketch appearance:

Border Collie Pencil Sketch

🚀 How to Use It

Generating Pet Portraits is a simple two-step process: you first create a Pet profile in the system with their initial photos, and then you call the portrait endpoint for that Pet.

1. Create a Pet Profile

First, create a pet via the API, attaching the original image you want to use. This provides the base image for our portrait generation.

curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: multipart/form-data" \
-F "name=Buddy" \
-F "description=A very good boy" \
-F "images=@/path/to/front_view.jpg" \
https://api.thedogapi.com/v1/pets

This request will return a Pet object containing an id (your pet_id) which you'll use in the next step.

2. Generate the Portrait

Once the pet is created, you can generate a stylized portrait by specifying the pet_id and your desired style (such as studio, watercolour, or pencil_sketch).

curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"style": "watercolour"}' \
https://api.thedogapi.com/v1/pets/{pet_id}/portrait

And that's it! The API will return the generated masterpiece based on your uploaded image.

3. Maintain Consistent Poses Across Styles (Optional)

Want to generate multiple styles of the exact same pose? You can pass an array of image_ids containing the ID of a previously uploaded image or a generated portrait. This tells the system to use that specific image as the structural reference.

curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{
"style": "pencil_sketch",
"image_ids": ["your_image_or_portrait_id"]
}' \
https://api.thedogapi.com/v1/pets/{pet_id}/portrait

This ensures that whether you're generating a watercolour or a pencil sketch, the pet's pose and composition remain beautifully consistent!

If you'd like to see a complete implementation, check out our open-source Pet Portrait Example codebase that demonstrates exactly how to interact with these endpoints to generate these amazing styles.

We can't wait to see the beautiful portraits you and your users create!

Introducing the Console Interface for The Dog API

· 2 min read
Aden Forshaw
Founder/CEO of ThatAPICompany

If you’ve ever built a project using The Dog API, you know how powerful it is for accessing dog breeds, facts, and images. Today, I'm excited to share a new open-source project I’ve been working on: console.thedogapi.com.

The DogAPI Console is a comprehensive, open-source web application designed to act as your daily driver for interacting with The Dog API. Instead of manually hitting endpoints via Postman or Curl, this console gives you a standardized, user-friendly interface to test and explore all of the API’s amazing features directly from your browser.

✨ Key Features

The console is built to scale alongside the API and right out of the box provides a 1:1 mapping with The Dog API's core capabilities. Here is what is available today:

  • 🔐 Simple API Key Management: Enter your free API key once, and it is securely saved via LocalStorage to authenticate all your future requests.
  • 🐕 Breed Explorer: A dedicated UI to sift through breed information, temperaments, and origin details.
  • 📸 Image Gallery & Uploads: Browse cute dog pictures, search by category, and easily upload your own dog images directly from the console interface.
  • 🏠 Pet Manager: Add, edit, and keep track of all the pets associated with your account.
  • ❤️ Favourites & Votes: A visual interface to vote on images and track your favorite pups.
  • 📝 Facts Explorer: Browse through the available dog facts with built-in search functionality and pagination.
  • 💡 Health Tips: Dedicated sections to browse and explore health tips.
  • 👤 Account Management: View your account details, track sub-ids, and manage your API limits right from the dashboard.
  • 🌙 Full Theme Support: Switch seamlessly between light and dark modes based on your system preferences.

Console Screenshot

Visit thedogapi.com to grab your free API key, and you'll be up and running in seconds.

I'd love to hear your feedback, feature requests 🐾

Join Our Monthly Discord Competitions!

· 2 min read
Aden Forshaw
Founder/CEO of ThatAPICompany

We're excited to announce our regular Discord competitions for developers using The Dog API!

So far we've given away thousands of dollars in prizes to our community members.

Win Cash Prizes!

We run competitions approximately once a month, giving you the chance to showcase what you've built and win real $$$.

  • 1st Prize: $150
  • 2nd Prize: $75

It's a great opportunity to get creative, build something fun with The Dog API, and get rewarded for your skills.

All redeption is done through Tremendous.com and have ways of redeeming for cash, gift cards, or other items.

Rules:

  • must use at least 1 of our APIs
  • must be made public so others can see the code and learn from it (e.g. on Github or a write up blog post)
  • the project not have been entered in a previous month, however you can enter as many times as you like with different projects

How to Enter

  1. Join our Discord: If you haven't already, join our Discord server where our community of developers hangs out.
  2. Go to #competitions: All announcements, rules, and entry submissions happen in the #competitions channel.
  3. Build & Submit: Follow the specific prompt for the month, build your application or script, and submit it according to the instructions in the channel!

Whether you're building a new app, sharing a script, or just getting started, our Discord is the best place to get news, support, and participate in these events. Good luck!