Ideal Dog Selector

Ideal Dog Selector · GPT Actions

The Dog API

Access information about different dog breeds, facts, and images.

  • GET /breedsRetrieves a list of dog breeds.
  • GET /breeds/{breed_id}Retrieves information about a dog breed by breed ID.
  • GET /breeds/{breed_id}/factsRetrieves facts about a specific dog breed.
  • GET /images/{image_id}/breedsRetrieves an image of a specific dog breed.
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "The Dog API",
    "description": "Access information about different dog breeds, facts, and images.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.thedogapi.com/v1",
      "description": "Main API server"
    }
  ],
  "paths": {
    "/breeds": {
      "get": {
        "operationId": "getBreeds",
        "summary": "Retrieves a list of dog breeds.",
        "responses": {
          "200": {
            "description": "A list of dog breeds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "temperament": {
                        "type": "string"
                      },
                      "life_span": {
                        "type": "string"
                      },
                      "alt_names": {
                        "type": "string"
                      },
                      "wikipedia_url": {
                        "type": "string"
                      },
                      "country_code": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/breeds/{breed_id}": {
      "get": {
        "operationId": "getDogByBreedId",
        "summary": "Retrieves information about a dog breed by breed ID.",
        "parameters": [
          {
            "in": "path",
            "name": "breed_id",
            "required": true,
            "description": "The ID of the dog breed",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detailed information about the specified dog breed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "temperament": {
                      "type": "string"
                    },
                    "life_span": {
                      "type": "string"
                    },
                    "alt_names": {
                      "type": "string"
                    },
                    "wikipedia_url": {
                      "type": "string"
                    },
                    "country_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/breeds/{breed_id}/facts": {
      "get": {
        "operationId": "getBreedFacts",
        "summary": "Retrieves facts about a specific dog breed.",
        "parameters": [
          {
            "in": "path",
            "name": "breed_id",
            "required": true,
            "description": "The unique ID of the dog breed",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of facts about the specified dog breed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/images/{image_id}/breeds": {
      "get": {
        "operationId": "getBreedImage",
        "summary": "Retrieves an image of a specific dog breed.",
        "parameters": [
          {
            "in": "path",
            "name": "image_id",
            "required": true,
            "description": "The unique ID of the dog breed image",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An image of the specified dog breed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "breeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}