Skip to content
Get started

Get a model

client.promptly.models.retrieve(stringmodelID, RequestOptionsoptions?): Model { id, codingIndex, contextLength, 8 more }
GET/api/promptly/models/{modelId}

Get a model

ParametersExpand Collapse
modelID: string
ReturnsExpand Collapse
Model { id, codingIndex, contextLength, 8 more }
id?: string
formatuuid
codingIndex?: number

Coding benchmark score

contextLength?: number

Maximum context window size

intelligenceIndex?: number

Intelligence benchmark score

minimum0
maximum100
name?: string
openRouterId?: string

Model identifier for OpenRouter

outputSpeed?: number

Tokens per second

powerTier?: number

Power tier (1 = most powerful)

minimum1
maximum5
provider?: string

Model provider (anthropic, openai, google, etc.)

supportsInternetSearch?: boolean
supportsToolCalling?: boolean

Get a model

import _0ct from '0ct';

const client = new _0ct({
  apiKey: process.env['0CT_API_KEY'], // This is the default and can be omitted
});

const model = await client.promptly.models.retrieve('modelId');

console.log(model.id);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "codingIndex": 0,
  "contextLength": 0,
  "intelligenceIndex": 0,
  "name": "name",
  "openRouterId": "openRouterId",
  "outputSpeed": 0,
  "powerTier": 1,
  "provider": "provider",
  "supportsInternetSearch": true,
  "supportsToolCalling": true
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "codingIndex": 0,
  "contextLength": 0,
  "intelligenceIndex": 0,
  "name": "name",
  "openRouterId": "openRouterId",
  "outputSpeed": 0,
  "powerTier": 1,
  "provider": "provider",
  "supportsInternetSearch": true,
  "supportsToolCalling": true
}