API endpoint for creating a space from a repo?

Looks like we can get spaces, search them, or find by id. Is there a way to create a new space from an existing repo programmatically?

Hi @tehfailsafe !

You can create a space from a local directory with the create_repo function of the hub client library: Hugging Face Hub API

Oh, great! I must have been looking at some different docs. We can even use create_branch with repo_type! Exactly what I wanted (vs uploading from local)