Skip to main content
GET
/
models
Get models
curl --request GET \
  --url https://api-dev.narrative.io/models \
  --header 'Authorization: Bearer <token>'
{
  "prev_page": null,
  "current_page": 1,
  "next_page": null,
  "total_records": 2,
  "total_pages": 1,
  "records": [
    {
      "id": 1,
      "company_id": 1,
      "name": "Llama-3.2-1B",
      "license_id": "META-LLAMA-COMMUNITY-3.2",
      "repository": {
        "type": "hugging_face",
        "organization": "meta-llama"
      },
      "collaborators": {
        "training": {
          "type": "all"
        },
        "inference": {
          "type": "all"
        }
      },
      "description": "Base Llama 3.2 1B model",
      "tags": [
        "llm",
        "base"
      ],
      "base_model_id": null,
      "created_at": "2024-01-10T08:00:00Z",
      "updated_at": null,
      "archived_at": null,
      "version": 1,
      "status": "active"
    },
    {
      "id": 2,
      "company_id": 1,
      "name": "Llama-3.1-8B-Instruct",
      "license_id": "META-LLAMA-COMMUNITY-3.1",
      "repository": {
        "type": "hugging_face",
        "organization": "meta-llama"
      },
      "collaborators": {
        "training": {
          "type": "all"
        },
        "inference": {
          "type": "all"
        }
      },
      "description": "Fine-tuned Llama model for instruction following",
      "tags": [
        "llm",
        "instruct"
      ],
      "base_model_id": null,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": null,
      "archived_at": null,
      "version": 1,
      "status": "active"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

page
integer
default:1

Page number. Starts from the first (1) page.

per_page
integer
default:100

Number of records to return per page.

repository_type
enum<string>

Filter models by repository type. Can be specified multiple times to filter by multiple types.

Available options:
hugging_face,
narrative
order_by
enum<string>

Sort order for results.

Available options:
created_at_asc,
created_at_desc

Response

OK

records
object[]
required
prev_page
integer<int64>

The number of previous page (if exists).

Example:

1

current_page
integer<int64>

The number of requested page.

Example:

1

next_page
integer<int64>

The number of next page (if exists).

Example:

2

total_records
integer<int64>

Total number of model records.

Example:

15

total_pages
integer<int64>

Total number of pages.

Example:

2