# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-28T19:39:56+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel, Field
class Type(Enum):
gif = 'gif'
class Image(BaseModel):
frames: Optional[str] = Field(
None, description='The number of frames in this GIF.', examples=['15']
)
height: Optional[str] = Field(
None, description='The height of this GIF in pixels.', examples=['200']
)
mp4: Optional[str] = Field(
None,
description='The URL for this GIF in .MP4 format.',
examples=['https://media1.giphy.com/media/cZ7rmKfFYOvYI/giphy.mp4'],
)
mp4_size: Optional[str] = Field(
None,
description='The size in bytes of the .MP4 file corresponding to this GIF.',
examples=['25123'],
)
size: Optional[str] = Field(
None, description='The size of this GIF in bytes.', examples=['32381']
)
url: Optional[str] = Field(
None,
description='The publicly-accessible direct URL for this GIF.',
examples=['https://media1.giphy.com/media/cZ7rmKfFYOvYI/200.gif'],
)
webp: Optional[str] = Field(
None,
description='The URL for this GIF in .webp format.',
examples=['https://media1.giphy.com/media/cZ7rmKfFYOvYI/giphy.webp'],
)
webp_size: Optional[str] = Field(
None,
description='The size in bytes of the .webp file corresponding to this GIF.',
examples=['12321'],
)
width: Optional[str] = Field(
None, description='The width of this GIF in pixels.', examples=['320']
)
class Meta(BaseModel):
msg: Optional[str] = Field(
None, description='HTTP Response Message', examples=['OK']
)
response_id: Optional[str] = Field(
None,
description='A unique ID paired with this response from the API.',
examples=['57eea03c72381f86e05c35d2'],
)
status: Optional[int] = Field(
None, description='HTTP Response Code', examples=[200]
)
class Pagination(BaseModel):
count: Optional[int] = Field(
None, description='Total number of items returned.', examples=[25]
)
offset: Optional[int] = Field(
None, description='Position in pagination.', examples=[75]
)
total_count: Optional[int] = Field(
None, description='Total number of items available.', examples=[250]
)
class User(BaseModel):
avatar_url: Optional[str] = Field(
None,
description="The URL for this user's avatar image.",
examples=['https://media1.giphy.com/avatars/election2016/XwYrZi5H87o6.gif'],
)
banner_url: Optional[str] = Field(
None,
description="The URL for the banner image that appears atop this user's profile page.",
examples=['https://media4.giphy.com/avatars/cheezburger/XkuejOhoGLE6.jpg'],
)
display_name: Optional[str] = Field(
None,
description='The display name associated with this user (contains formatting the base username might not).',
examples=['JoeCool4000'],
)
profile_url: Optional[str] = Field(
None,
description="The URL for this user's profile.",
examples=['https://giphy.com/cheezburger/'],
)
twitter: Optional[str] = Field(
None,
description='The Twitter username associated with this user, if applicable.',
examples=['@joecool4000'],
)
username: Optional[str] = Field(
None,
description='The username associated with this user.',
examples=['joecool4000'],
)
class Images(BaseModel):
downsized: Optional[Image] = None
downsized_large: Optional[Image] = None
downsized_medium: Optional[Image] = None
downsized_small: Optional[Image] = None
downsized_still: Optional[Image] = None
fixed_height: Optional[Image] = None
fixed_height_downsampled: Optional[Image] = None
fixed_height_small: Optional[Image] = None
fixed_height_small_still: Optional[Image] = None
fixed_height_still: Optional[Image] = None
fixed_width: Optional[Image] = None
fixed_width_downsampled: Optional[Image] = None
fixed_width_small: Optional[Image] = None
fixed_width_small_still: Optional[Image] = None
fixed_width_still: Optional[Image] = None
looping: Optional[Image] = None
original: Optional[Image] = None
original_still: Optional[Image] = None
preview: Optional[Image] = None
preview_gif: Optional[Image] = None
class Gif(BaseModel):
bitly_url: Optional[str] = Field(
None,
description='The unique bit.ly URL for this GIF',
examples=['http://gph.is/1gsWDcL'],
)
content_url: Optional[str] = Field(None, description='Currently unused')
create_datetime: Optional[datetime] = Field(
None,
description='The date this GIF was added to the GIPHY database.',
examples=['2013-08-01 12:41:48'],
)
embded_url: Optional[str] = Field(
None,
description='A URL used for embedding this GIF',
examples=['http://giphy.com/embed/YsTs5ltWtEhnq'],
)
featured_tags: Optional[List[str]] = Field(
None,
description='An array of featured tags for this GIF (Note: Not available when using the Public Beta Key)\n',
)
id: Optional[str] = Field(
None, description="This GIF's unique ID", examples=['YsTs5ltWtEhnq']
)
images: Optional[Images] = Field(
None,
description='An object containing data for various available formats and sizes of this GIF.',
)
import_datetime: Optional[datetime] = Field(
None,
description="The creation or upload date from this GIF's source.",
examples=['2013-08-01 12:41:48'],
)
rating: Optional[str] = Field(
None,
description='The MPAA-style rating for this content. Examples include Y, G, PG, PG-13 and R',
examples=['g'],
)
slug: Optional[str] = Field(
None,
description="The unique slug used in this GIF's URL",
examples=['confused-flying-YsTs5ltWtEhnq'],
)
source: Optional[str] = Field(
None,
description='The page on which this GIF was found',
examples=[
'http://www.reddit.com/r/reactiongifs/comments/1xpyaa/superman_goes_to_hollywood/'
],
)
source_post_url: Optional[str] = Field(
None,
description='The URL of the webpage on which this GIF was found.',
examples=['http://cheezburger.com/5282328320'],
)
source_tld: Optional[str] = Field(
None,
description='The top level domain of the source URL.',
examples=['cheezburger.com'],
)
tags: Optional[List[str]] = Field(
None,
description='An array of tags for this GIF (Note: Not available when using the Public Beta Key)\n',
)
trending_datetime: Optional[datetime] = Field(
None,
description='The date on which this gif was marked trending, if applicable.',
examples=['2013-08-01 12:41:48'],
)
type: Optional[Type] = Field(
'gif', description='Type of the gif. By default, this is almost always gif'
)
update_datetime: Optional[datetime] = Field(
None,
description='The date on which this GIF was last updated.',
examples=['2013-08-01 12:41:48'],
)
url: Optional[str] = Field(
None,
description='The unique URL for this GIF',
examples=['http://giphy.com/gifs/confused-flying-YsTs5ltWtEhnq'],
)
user: Optional[User] = None
username: Optional[str] = Field(
None,
description='The username this GIF is attached to, if applicable',
examples=['JoeCool4000'],
)
class GifsGetResponse(BaseModel):
data: Optional[List[Gif]] = None
meta: Optional[Meta] = None
pagination: Optional[Pagination] = None
class GifsRandomGetResponse(BaseModel):
data: Optional[Gif] = None
meta: Optional[Meta] = None
class GifsSearchGetResponse(BaseModel):
data: Optional[List[Gif]] = None
meta: Optional[Meta] = None
pagination: Optional[Pagination] = None
class GifsTranslateGetResponse(BaseModel):
data: Optional[Gif] = None
meta: Optional[Meta] = None
class GifsTrendingGetResponse(BaseModel):
data: Optional[List[Gif]] = None
meta: Optional[Meta] = None
pagination: Optional[Pagination] = None
class GifsGifIdGetResponse(BaseModel):
data: Optional[Gif] = None
meta: Optional[Meta] = None
class StickersRandomGetResponse(BaseModel):
data: Optional[Gif] = None
meta: Optional[Meta] = None
class StickersSearchGetResponse(BaseModel):
data: Optional[List[Gif]] = None
meta: Optional[Meta] = None
pagination: Optional[Pagination] = None
class StickersTranslateGetResponse(BaseModel):
data: Optional[Gif] = None
meta: Optional[Meta] = None
class StickersTrendingGetResponse(BaseModel):
data: Optional[List[Gif]] = None
meta: Optional[Meta] = None
pagination: Optional[Pagination] = None