Skip to main content
POST
/
api
/
repos
Create repository
curl --request POST \
  --url https://hub.oxen.ai/api/repos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "A repository for image classification",
  "name": "Cat-Dog-Classifier",
  "namespace": "ox",
  "user": {
    "email": "[email protected]",
    "name": "bessie"
  }
}
'
{
  "metadata_entries": [
    {
      "content_hash": "a1b2c3d4e5f678902e41",
      "data_type": "image",
      "file_size": 1024000,
      "path": "data/images/cow.jpg"
    }
  ],
  "repository": {
    "latest_commit": {
      "author": "ox",
      "email": "[email protected]",
      "id": "a1b2c3d4e5f678902e41",
      "message": "Initial dataset import.",
      "parent_ids": [
        "f1e2d3c4b5a67890fedc"
      ],
      "timestamp": "2025-01-01T10:00:00Z"
    },
    "name": "ImageNet-1k",
    "namespace": "ox"
  },
  "status": "success",
  "status_message": "resource_created"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Repository creation payload (JSON or Multipart)

name
string
required
namespace
string
required
description
string | null
files
object[] | null
host
string | null
is_public
boolean | null
root_commit
object
Example:
{
"author": "ox",
"email": "[email protected]",
"id": "a1b2c3d4e5f67890abcdef1234567890",
"message": "Refactor data loading pipeline.",
"parent_ids": ["f1e2d3c4b5a67890fedcba9876543210"],
"timestamp": "2025-01-01T10:00:00Z"
}
scheme
string | null
storage_opts
object

Response

Repository created

repository
object
required
Example:
{
"latest_commit": {
"author": "ox",
"email": "[email protected]",
"id": "a1b2c3d4e5f67890abcdef1234567890",
"message": "Initial dataset import.",
"parent_ids": ["f1e2d3c4b5a67890fedcba9876543210"],
"timestamp": "2025-01-01T10:00:00Z"
},
"name": "ImageNet-1k",
"namespace": "ox"
}
status
string
required
status_message
string
required
metadata_entries
object[] | null