ModelWorks logoModelWorks
API

Slug Resolution

Resolve a URL path to an entity type and UID using the slug endpoint.

Slug Resolution

The slug endpoint is a quick lookup utility that resolves a human-readable URL path — like novita or novita/ling-30-flash-sante — to an entity type and its UID. It's the fastest way to discover the internal identifier for a user, circuit, or board when you only know its public-facing name.

Most other API endpoints are keyed by UID. Use slug resolution first to turn a name into a UID, then pass that UID to the circuit, board, or profile endpoints.

Base URL

All examples assume the following base URL:

Text
https://modelworks.ai/api

Resolve a slug

GET /slug/{path}

Resolves a URL path to an entity. The path is a slash-separated string that mirrors how the entity appears in a public ModelWorks URL:

  • One segment (novita) — resolves to a user.
  • Two segments (novita/ling-30-flash-sante) — resolves to a circuit or circuit board owned by that user. Circuits are checked first, then boards.

Resolution is case-insensitive and public-only: private circuits and private boards are excluded from slug resolution, so you'll never accidentally resolve to an entity you (or anyone else) can't see.

No authentication is required — this endpoint is fully public.

Path parameters

NameTypeDescription
pathstringThe URL path to resolve (e.g. novita or novita/ling-30-flash-sante).

Example: resolve a user

Bash
curl https://modelworks.ai/api/slug/novita

Example: resolve a circuit

Bash
curl https://modelworks.ai/api/slug/novita/ling-30-flash-sante

Response

200 OK

Returns the resolved entity type and its UID inside the standard payload wrapper.

JSON
{
  "status": "success",
  "payload": {
    "entity_type": "circuit",
    "entity_uid": "73120d53-bf89-44fa-a035-5b88fe41574a",
    "user_uid": "4a1b2c3d-1234-4abc-9def-1234567890ab"
  }
}

SlugResponse fields

FieldTypeDescription
entity_typestringThe kind of entity resolved: "user", "circuit", or "circuit_board".
entity_uidstringThe unique ID of the resolved entity.
user_uidstring | nullThe owner's user UID, when the entity is a circuit or board. null for user lookups.

Entity types

entity_typeOne-segment pathTwo-segment pathentity_uid is a…
"user"yes—user UID
"circuit"—yescircuit UID
"circuit_board"—yesboard UID

Not found

404 Not Found

If the slug doesn't match any public entity, the endpoint returns a 404.

JSON
{
  "error": {
    "message": "Not Found: Slug",
    "code": "NotFound"
  }
}

This happens when the username doesn't exist, or when a two-segment path doesn't match any public circuit or board owned by that user. Private circuits and private boards are excluded from resolution — if you own a private circuit and resolve its slug, you'll get a 404 even though the circuit exists.


Practical workflow

To get a circuit's UID and then fetch the circuit, first resolve the slug, then use the UID with the circuit endpoints:

Bash
# 1. Resolve the slug to a circuit UID
curl https://modelworks.ai/api/slug/novita/ling-30-flash-sante

# 2. Use the returned entity_uid with the circuit endpoint
curl https://modelworks.ai/api/circuits/73120d53-bf89-44fa-a035-5b88fe41574a

The same pattern works for boards (entity_type: "circuit_board") and users (entity_type: "user"): resolve the slug, grab entity_uid, then call the UID-based endpoint.


Error responses

HTTP StatusCodeDescription
404 Not FoundNotFoundNo public entity matches the slug.
500 Internal Server ErrorInternalTransient server or database error.

Note: Results are cached for up to 1 hour. If you rename a circuit or board, expect a short delay before the slug endpoint reflects the change.

On this page

On this page