# How to upload a model card through the API?

**URL:** <https://discuss.huggingface.co/t/how-to-upload-a-model-card-through-the-api/20907>\
**Category:** 🤗Hub\
**Created:** [July 27, 2022, 12:20am UTC](https://discuss.huggingface.co/t/how-to-upload-a-model-card-through-the-api/20907 "2022-07-27T00:20:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanaiela](https://avatars.discourse-cdn.com/v4/letter/y/bcef8e/32.png) [@yanaiela](https://discuss.huggingface.co/u/yanaiela)\
**Post date:** [July 27, 2022, 12:20am UTC](https://discuss.huggingface.co/t/how-to-upload-a-model-card-through-the-api/20907/1 "2022-07-27T00:20:05Z")

</div>

I found examples for uploading model cards solely through the web interface.  
Is it possible to also upload them through the API?

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [July 27, 2022, 8:16am UTC](https://discuss.huggingface.co/t/how-to-upload-a-model-card-through-the-api/20907/2 "2022-07-27T08:16:18Z")

</div>

Hi,

Model cards are just Markdown files (.md), which you can upload programmatically using the `huggingface_hub` Python library.

Check the guide here: [Upload files to the Hub](https://huggingface.co/docs/huggingface_hub/how-to-upstream)

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [July 27, 2022, 4:12pm UTC](https://discuss.huggingface.co/t/how-to-upload-a-model-card-through-the-api/20907/3 "2022-07-27T16:12:50Z")

</div>

note that we also have helpers to just update the metadata part of the model card (i.e. the YAML part), if you want to
