Create a repository
Provisions a repository: DB insert (authoritative) → Gitea create (rolled back on failure) → best-effort fga owner tuple. The caller becomes the owner.
Authorizations
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Body
The repository name. Must start with an alphanumeric character and
be ≤100 characters of [A-Za-z0-9._-].
^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$"my-model"
Defaults to private when omitted.
private, team Response
The created repository.
"Fine-tuned weights for the acme assistant."
Opaque, stable repository id (the canonical key; not a user label).
"rqz4h6k2m5n7p9r3t5v7w9x2"
The repository name (URL label).
"my-model"
The organization URL slug the repository belongs to.
"acme"
private — visible only to the owner and explicit collaborators.
team — additionally visible to the owning team.
private, team