# How to upload a model card through the API?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-upload-a-model-card-through-the-api%2F20907%3E%5C
**Category:** 🤗Hub\
**Created:** [July 27, 2022, 12:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-upload-a-model-card-through-the-api%2F20907 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyanaiela)%5C
**Post date:** [July 27, 2022, 12:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-upload-a-model-card-through-the-api%2F20907%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [July 27, 2022, 8:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-upload-a-model-card-through-the-api%2F20907%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjulien-c)%5C
**Post date:** [July 27, 2022, 4:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-upload-a-model-card-through-the-api%2F20907%2F3 "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
