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:
https://modelworks.ai/apiResolve 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
| Name | Type | Description |
|---|---|---|
path | string | The URL path to resolve (e.g. novita or novita/ling-30-flash-sante). |
Example: resolve a user
curl https://modelworks.ai/api/slug/novitaExample: resolve a circuit
curl https://modelworks.ai/api/slug/novita/ling-30-flash-santeResponse
200 OK
Returns the resolved entity type and its UID inside the standard payload wrapper.
{
"status": "success",
"payload": {
"entity_type": "circuit",
"entity_uid": "73120d53-bf89-44fa-a035-5b88fe41574a",
"user_uid": "4a1b2c3d-1234-4abc-9def-1234567890ab"
}
}SlugResponse fields
| Field | Type | Description |
|---|---|---|
entity_type | string | The kind of entity resolved: "user", "circuit", or "circuit_board". |
entity_uid | string | The unique ID of the resolved entity. |
user_uid | string | null | The owner's user UID, when the entity is a circuit or board. null for user lookups. |
Entity types
entity_type | One-segment path | Two-segment path | entity_uid is a… |
|---|---|---|---|
"user" | yes | — | user UID |
"circuit" | — | yes | circuit UID |
"circuit_board" | — | yes | board UID |
Not found
404 Not Found
If the slug doesn't match any public entity, the endpoint returns a 404.
{
"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:
# 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-5b88fe41574aThe 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 Status | Code | Description |
|---|---|---|
| 404 Not Found | NotFound | No public entity matches the slug. |
| 500 Internal Server Error | Internal | Transient 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.