API Reference

Complete reference for the Gemmai Valuation API. Base URL: https://api.gemmai.io

SectionDescription
ValuationCreate and retrieve price estimates.
EnrichmentDerive item attributes from uploaded media.
ModelsList models and versions, and get validation schemas.
ValidateValidate attributes against a model's schema.
VisionUpload images and get a fileId for enrich/valuations.
SearchSearch candidates and filter options.
ReferenceReference data and enum search (brands, models).
Asset LoansDiscover eligible assets and issue secured loans.
VehiclesMonitor vehicles for ownership changes and sale listings.

Authentication

All endpoints except GET /v1 require an X-API-Key header.

X-API-Key: <your-api-key>

Missing or invalid keys return 401 Unauthorized:

{ "error": "Unauthorized" }

Contact your account manager or check your dashboard to obtain an API key. Some endpoints (e.g. Vehicle Monitoring) require additional key scopes — see the relevant section for details.


Valuation

GET /v1

Returns API info. No authentication required.

Response (200):

{
  "name": "Gemmai Valuation API",
  "version": "1.0.0",
  "description": "API for valuing cars, watches, and rings"
}

POST /v1/valuations

Create a new valuation. Send model and attributes; optionally add a file in input.file to trigger enrichment first (unless options.skipEnrich is true).

Request body:

  • Name
    model
    Type
    string
    Description

    What to value: "car" | "wristwatch" | "ring" | "property" for the current default version, or a pinned version such as "car@0.1" (see GET /v1/models). The response returns the exact version that ran, so you can send it back to pin. Required unless attributes.assetType is set. Deprecated aliases: category and options.model.

  • Name
    attributes
    Type
    object
    Description

    Attributes for that model. See Attributes. attributes.assetType (e.g. "car") is shared by all models: without model it selects the default version, with model it must match. The response always includes it.

  • Name
    input
    Type
    object
    Description

    Unstructured evidence about the item, used during enrichment unless skipEnrich is true. text is a description of the item (up to 2000 characters) that the API reads attributes from; with it, attributes can be partial for every model. file is an object with a required fileId from POST /v1/files. Example: { "text": "Rolex Submariner 2019, box and papers", "file": { "fileId": "..." } }. Values in attributes always take precedence over what's read from input. Unknown fields return 422 (unknownField).

  • Name
    options
    Type
    object
    Description

    Valuation options (see below).

Valuation options:

  • Name
    skipEnrich
    Type
    boolean
    Description

    Skip enrichment even when input.file is provided. Default: false.

  • Name
    asOf
    Type
    string | number
    Description

    Point-in-time valuation. ISO 8601, date-only ("2025-01-15"), or epoch seconds.

  • Name
    market
    Type
    string
    Description

    Market region, e.g. "SE", "US", "EU".

  • Name
    currency
    Type
    string
    Description

    ISO 4217 code, e.g. "SEK", "USD".

  • Name
    confidenceFloor
    Type
    number
    Description

    Suppress results below this confidence (0–1).

Request example

{
  "model": "wristwatch",
  "attributes": {
    "brand": "Rolex",
    "model": "Submariner",
    "referenceNumber": "116610LN"
  },
  "options": {
    "currency": "SEK",
    "market": "SE"
  }
}

Response (200)

{
  "success": true,
  "id": "uuid",
  "model": "wristwatch@0.2",
  "asOf": "2025-03-06T00:00:00.000Z",
  "valuation": {
    "currency": "SEK",
    "value": 125000,
    "lowerBound": 110000,
    "upperBound": 140000,
    "confidence": 0.85
  },
  "attributes": { "assetType": "wristwatch", "brand": "Rolex", "model": "Submariner", "movement": "automatic", "...": "..." },
  "enrichment": {
    "confidence": 1,
    "enriched": [
      { "attribute": "movement", "value": "automatic", "source": "WATCH_DATABASE", "confidence": 1 }
    ]
  },
  "warnings": [
    {
      "code": "AMBIGUOUS_OPTION",
      "message": "Multiple dialColor options available; send one to lock valuation range."
    }
  ],
  "metadata": {
    "timestamp": "2025-03-06T12:00:00.000Z",
    "creditUsed": 1
  }
}

Response (400)

{
  "success": false,
  "details": { "<field>": ["error message"] },
  "metadata": { "timestamp": "...", "creditUsed": 0 }
}

Response (400) — missing model

{ "error": "app", "message": "\"model\" is required, e.g. \"car\" or \"car@0.1\"", "details": null }

Response (404) — unknown model

{ "error": "app", "message": "Unknown asset type: boat", "details": null }

Enrichment

POST /v1/enrich

Derive item attributes from a previously uploaded image (sent in input.file).

Request body:

  • Name
    model
    Type
    string
    Description

    "car" | "wristwatch" | "ring" for the current default version, or a pinned version such as "wristwatch@0.2" (see GET /v1/models). Attributes are normalized into that version's schema, and the response's model says which version was used. Deprecated aliases: category and version. Query parameters still work but are deprecated.

  • Name
    input
    Type
    object
    Description

    Unstructured evidence about the item: text, a description to read attributes from (up to 2000 characters), and file, an object with a required fileId from POST /v1/files. Example: { "text": "Rolex Submariner 2019, box and papers", "file": { "fileId": "..." } }. Required if no attributes are provided. Values in attributes always take precedence over what's read from input. Unknown fields return 422 (unknownField).

  • Name
    attributes
    Type
    object
    Description

    Optional initial attributes. Enrichment merges them with derived values.

Response fields:

  • Name
    model
    Type
    string
    Description

    The model version that was used, e.g. "wristwatch@0.2". Pass it as model to POST /v1/valuations to value against the same version.

  • Name
    normalizedAttributes
    Type
    object
    Description

    Your input merged with derived values, in that version's schema.

  • Name
    warnings
    Type
    array
    Description

    Includes ATTRIBUTES_INCOMPLETE when normalizedAttributes would not pass the schema yet.

Request example

{
  "model": "wristwatch",
  "attributes": { "brand": "Rolex" },
  "input": { "file": { "fileId": "file-id-123" } }
}

Response (200)

{
  "model": "wristwatch@0.2",
  "normalizedAttributes": {
    "assetType": "wristwatch",
    "brand": "Rolex",
    "model": "Submariner",
    "strap": "steel"
  },
  "candidates": [
    { "attribute": "strap", "value": "steel", "confidence": 0.9, "source": "VISUAL_MATCH" }
  ],
  "enriched": [
    { "attribute": "brand", "value": "Rolex", "confidence": 1, "source": "car-registry" }
  ],
  "confidence": 0.92,
  "warnings": [
    { "code": "AMBIGUOUS_OPTION", "message": "..." }
  ]
}

Response (400)

{ "error": "app", "message": "\"model\" or \"attributes.assetType\" is required, e.g. \"car\" or \"car@0.1\"", "details": null }

Response (404)

{ "error": "app", "message": "Unknown asset type: boat", "details": null }

Response (500)

{ "error": "Enrichment failed" }

Models

GET /v1/models

List every model version. A model's name (e.g. "wristwatch@0.2") can be passed as model to pin that version; the plain category (e.g. "wristwatch") uses the version marked isDefault.

GET /v1/categories is still available as a deprecated alias.

  • Name
    assetType
    Type
    string
    Description

    Filter by asset type, e.g. ?assetType=car or a comma-separated list such as ?assetType=car,wristwatch. (?category= is a deprecated alias.)

Response (200)

{
  "models": [
    { "assetType": "car", "name": "car@0.1", "deployedAt": "2026-03-25", "isDefault": true },
    { "assetType": "wristwatch", "name": "wristwatch@0.2", "deployedAt": "2026-03-25", "isDefault": true },
    { "assetType": "wristwatch", "name": "wristwatch@0.3", "deployedAt": "2026-11-18", "isDefault": false }
  ]
}

GET /v1/models/:model

List the versions available for a model. Each model can have several versions at the same time, so a breaking schema change ships as a new version and existing integrations keep working until they switch.

:model can be a plain name (wristwatch) or a specific version (wristwatch@0.3). With a version, only that version is returned. (Deprecated alias: GET /v1/categories/:category.)

Response (200)

{
  "assetType": "wristwatch",
  "defaultVersion": "wristwatch@0.2",
  "versions": [
    { "name": "wristwatch@0.2", "deployedAt": "2026-03-25", "isDefault": true },
    { "name": "wristwatch@0.3", "deployedAt": "2026-11-18", "isDefault": false }
  ]
}

Response (200) — GET /v1/models/wristwatch@0.3

{
  "assetType": "wristwatch",
  "name": "wristwatch@0.3",
  "deployedAt": "2026-11-18",
  "isDefault": false
}

Response (404)

{ "error": "Unknown asset type: boat" }

GET /v1/models/:model/schema

Get the validation schema for a model. Use this to build forms, generate dropdowns, or validate attributes before calling the API.

Returns the default version unless you ask for a specific one, either in the path (GET /v1/models/wristwatch@0.3/schema) or with ?version=wristwatch@0.3 (or just ?version=0.3). Pin a version if you don't want the default to change underneath you. (Deprecated alias: GET /v1/categories/:category/schema.)

Response (200)

{
  "assetType": "wristwatch",
  "version": "wristwatch@0.2",
  "deployedAt": "2026-03-25",
  "isDefault": true,
  "schema": {
    "type": "object",
    "properties": {
      "brand": { "type": "string" },
      "strap": { "type": "string", "enum": ["steel", "leather", "..."] }
    },
    "required": ["brand"],
    "additionalProperties": false
  }
}

Response (404)

{ "error": "Unknown asset type: boat" }

Validate

POST /v1/validate

Validate attributes against a model's schema without running valuation or enrichment.

  • Name
    model
    Type
    string
    Description

    "car" | "wristwatch" | "ring" | "property" for the current default version, or a pinned version such as "wristwatch@0.2". Deprecated aliases: category and version.

  • Name
    attributes
    Type
    object
    Description

    Attributes to validate.

Request example

{
  "model": "wristwatch",
  "attributes": { "brand": "Rolex" }
}

Response — valid

{ "model": "wristwatch@0.2", "valid": true, "error": null }

Response — invalid

{
  "model": "wristwatch@0.2",
  "valid": false,
  "error": { "<field>": ["validation message"] }
}

Files

POST /v1/files

Submit an image by URL. Returns a fileId to send as input.file.fileId to /v1/enrich and POST /v1/valuations.

  • Name
    imageUrl
    Type
    string
    Description

    Public URL of the image to analyze.

Response (200)

{
  "fileId": "uuid",
  "status": "completed",
  "objects": [{ "assetType": "wristwatch" }],
  "usage": { "creditUsed": 1 }
}

If the same image (by hash) was already processed, a cached result is returned with creditUsed: 0.


GET /v1/files/:id

Get status for a previously submitted media item.

Response (200)

{ "id": "uuid", "status": "pending" }

GET /v1/search

Search candidates with optional filters and pagination.

  • Name
    category
    Type
    string
    Description

    Filter by category.

  • Name
    attributes.{key}
    Type
    string
    Description

    Filter by attribute (repeat for multiple).

  • Name
    limit
    Type
    number
    Description

    Max results (default 10).

  • Name
    offset
    Type
    number
    Description

    Pagination offset (default 0).


GET /v1/search/filters

Get available filter keys/aggregations for the search index.

Response (200)

[
  { "key": "brand", "doc_count": 150 }
]

Reference

GET /v1/reference/:ref

Reference/enum search. :ref is the reference type (e.g. brand, model, or assetType to list the asset types). Only attributes that have an enumRef in the schema support this endpoint.

  • Name
    q
    Type
    string
    Description

    Search term (e.g. partial brand or model name).

  • Name
    assetType
    Type
    string
    Description

    Limit results to one asset type, e.g. wristwatch. (category is a deprecated alias.)

  • Name
    (other)
    Type
    string
    Description

    Pass already-selected attributes to narrow scope (e.g. brand=Rolex when looking up model).

Returns a list of { value, probability } items. Use the exact value string when sending attributes.


Asset Loans

Issue loans secured against a customer's assets. The customer retains the asset; security is a credit marking registered with the relevant authority. See the Asset Loans guide for the full flow.

POST /v1/asset-offers

Discover which of a customer's assets are eligible as security and the maximum loan amount against each. Creates an offer record with no effect on the customer.

Request body:

  • Name
    identityNumber
    Type
    string
    Description

    Customer identity number (e.g. Swedish personal number). Format varies by country.

  • Name
    country
    Type
    string
    Description

    ISO 3166-1 alpha-2 code, e.g. "SE". Determines which registries and valuation rules apply.

Request body

{
  "identityNumber": "196801012345",
  "country": "SE"
}

Response (200)

{
  "offerId": "off_k93mxp12",
  "expiresAt": "2026-04-22T10:23:44Z",
  "assets": [
    {
      "assetId": "asset_vehicle_9f3kd82jpl",
      "assetType": "vehicle",
      "maxLoanAmount": 129000,
      "currency": "SEK",
      "details": { "make": "Volvo", "model": "XC60", "modelYear": 2021 }
    }
  ]
}

GET /v1/asset-offers

List previously issued offers.

  • Name
    identityNumber
    Type
    string
    Description

    Filter by customer identity number.

Returns an array of offers in the same shape as POST /v1/asset-offers.


GET /v1/asset-offers/:offerId

Fetch a single offer by ID.

  • Name
    offerId
    Type
    string
    Description

    The offerId returned when the offer was created.


POST /v1/asset-loans

Execute a secured loan. Initiates contract signing with the customer and registers the credit marking.

Request body:

  • Name
    offerId
    Type
    string
    Description

    Reference to the asset offer. Soft reference — assetId alone is sufficient.

  • Name
    assetId
    Type
    string
    Description

    Asset to use as security. The customer keeps the asset.

  • Name
    loanAmount
    Type
    number
    Description

    Requested amount. Must not exceed maxLoanAmount for the asset.

  • Name
    termMonths
    Type
    number
    Description

    Loan term in months.

  • Name
    currency
    Type
    string
    Description

    ISO 4217 currency code, e.g. "SEK".

  • Name
    customer
    Type
    object
    Description

    Customer details for the signing request.

  • Name
    customer.identityNumber
    Type
    string
    Description

    Customer identity number.

  • Name
    customer.country
    Type
    string
    Description

    ISO 3166-1 alpha-2 code. Determines which registry receives the credit marking.

  • Name
    customer.email
    Type
    string
    Description

    Customer email address.

  • Name
    customer.phone
    Type
    string
    Description

    Customer phone in E.164 format, e.g. "+46701234567".

Request body

{
  "offerId": "off_k93mxp12",
  "assetId": "asset_vehicle_9f3kd82jpl",
  "loanAmount": 80000,
  "termMonths": 60,
  "currency": "SEK",
  "customer": {
    "identityNumber": "196801012345",
    "country": "SE",
    "email": "anna.larsson@email.se",
    "phone": "+46701234567"
  }
}

Response (200)

{
  "loanId": "loan_8xk2mp91za",
  "status": "IN_PROGRESS",
  "assetId": "asset_vehicle_9f3kd82jpl",
  "requirements": [
    {
      "type": "CUSTOMER_CONTRACT",
      "status": "PENDING",
      "responsibleParty": "USER",
      "details": {
        "signingUrl": "https://sign.yourservice.se/ctr_x91pla33",
        "expiresAt": "2026-04-18T10:23:44Z"
      }
    },
    {
      "type": "CREDIT_MARKING_REGISTRATION",
      "status": "PENDING",
      "responsibleParty": "SYSTEM",
      "details": { "registry": "transportstyrelsen" }
    }
  ]
}

GET /v1/asset-loans/:loanId

Poll loan and contract status.

Path parameters:

  • Name
    loanId
    Type
    string
    Description

    The loanId returned from POST /v1/asset-loans.

Loan status values: IN_PROGRESS · COMPLETED · CANCELLED

Requirement types:

TypeResponsibleDescription
CUSTOMER_CONTRACTUSERCustomer signs the loan agreement. details includes signingUrl and expiresAt while pending.
CREDIT_MARKING_REGISTRATIONSYSTEMCredit marking registered with the authority. details includes registry; adds registeredAt and reference when done.

Requirement status values: PENDING · IN_PROGRESS · COMPLETED · FAILED

Response (200) — completed

{
  "loanId": "loan_8xk2mp91za",
  "status": "COMPLETED",
  "assetId": "asset_vehicle_9f3kd82jpl",
  "requirements": [
    {
      "type": "CUSTOMER_CONTRACT",
      "status": "COMPLETED",
      "responsibleParty": "USER",
      "details": { "completedAt": "2026-04-16T08:00:00Z" }
    },
    {
      "type": "CREDIT_MARKING_REGISTRATION",
      "status": "COMPLETED",
      "responsibleParty": "SYSTEM",
      "details": {
        "registry": "transportstyrelsen",
        "reference": "TS-2026-88821",
        "registeredAt": "2026-04-16T09:14:00Z"
      }
    }
  ]
}

Response (404)

{ "error": "Loan not found" }

Vehicles

Subscribe to vehicle lifecycle events by licence plate. Gemmai delivers a POST to your configured webhook endpoint when an event is detected. See the Vehicle Monitoring guide for setup and webhook details.

GET /v1/vehicles/se/monitorings

List monitorings registered under your account.

  • Name
    limit
    Type
    number
    Description

    Maximum results to return. Default 100, max 100.

  • Name
    offset
    Type
    number
    Description

    Pagination offset. Default 0.

Response (200)

{
  "data": [
    {
      "monitorId": "3f2e1a4b-...",
      "accountId": "acct_...",
      "licensePlate": "ABC123",
      "vin": null,
      "eventTypes": ["listed_for_sale", "ownership_change"],
      "createdAt": "2026-05-01T09:00:00.000Z"
    }
  ],
  "limit": 100,
  "offset": 0
}

POST /v1/vehicles/se/monitorings

Create or upsert a monitoring for a vehicle. If one already exists for the same licence plate, its eventTypes are replaced.

  • Name
    licensePlate
    Type
    string
    Description

    Licence plate to monitor.

  • Name
    eventTypes
    Type
    string[]
    Description

    Event types to subscribe to: "listed_for_sale" and/or "ownership_change". At least one required.

  • Name
    metadata
    Type
    object
    Description

    Arbitrary key-value data attached to the monitoring (e.g. your internal customer or loan ID). Returned on all read and webhook responses.

Request body

{
  "licensePlate": "ABC123",
  "eventTypes": ["listed_for_sale", "ownership_change"],
  "metadata": { "loanId": "loan_4m2np91" }
}

Response (201)

{
  "monitorId": "3f2e1a4b-...",
  "accountId": "acct_...",
  "licensePlate": "ABC123",
  "vin": null,
  "eventTypes": ["listed_for_sale", "ownership_change"],
  "metadata": { "loanId": "loan_4m2np91" },
  "createdAt": "2026-05-01T09:00:00.000Z"
}

GET /v1/vehicles/se/monitorings/:licensePlate

Fetch a single monitoring by licence plate.

  • Name
    licensePlate
    Type
    string
    Description

    Licence plate of the monitoring.

Response (200)

{
  "monitorId": "3f2e1a4b-...",
  "licensePlate": "ABC123",
  "eventTypes": ["listed_for_sale"],
  "createdAt": "2026-05-01T09:00:00.000Z"
}

Response (404)

{ "error": "Monitor not found" }

PATCH /v1/vehicles/se/monitorings/:licensePlate

Replace the event types and/or metadata on an existing monitoring.

  • Name
    eventTypes
    Type
    string[]
    Description

    Replaces the current event type subscriptions.

  • Name
    metadata
    Type
    object
    Description

    Replaces the attached metadata object.

Request body

{ "eventTypes": ["ownership_change"] }

Response (200)

{
  "monitorId": "3f2e1a4b-...",
  "licensePlate": "ABC123",
  "eventTypes": ["ownership_change"],
  "createdAt": "2026-05-01T09:00:00.000Z"
}

DELETE /v1/vehicles/se/monitorings/:licensePlate

Permanently remove a monitoring. No further webhook events will be delivered for this vehicle.

Returns 204 No Content on success, 404 if not found.


Errors

StatusMeaningResponse shape
400Invalid input or validation error{ "error": "..." } or { "success": false, "details": { "<field>": ["..."] }, "metadata": {...} }
404Resource not found{ "error": "Not Found" }
500Server error{ "error": "message" }

Validation errors from Valuations return 400 with a details object keyed by field name:

{
  "success": false,
  "details": { "brand": ["Required"], "referenceNumber": ["Invalid value"] },
  "metadata": { "timestamp": "...", "creditUsed": 0 }
}

Was this page helpful?