For the complete documentation index, see llms.txt. This page is also available as Markdown.

Model

Snyk API reference for the Model endpoints, including request parameters and response schemas

This document uses the REST API. For more details, see the Authentication for API page.

List models (Early Access)

get

List AI models in Snyk's Risk Database, with their metadata and risk scores. Results are sorted by last_updated, most recent first.

Risk scores, capability scores, licensing, and country of origin are returned only if your tenant is entitled to Evo Risk Intelligence. Otherwise, these fields are empty or omitted.

Required permissions

  • View Tenant Details (tenant.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Tenant ID

Example: e4a039e5-968b-4f1a-b190-caf3514243b5
Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
providerstring[] · min: 1Optional

Return only models whose provider slug matches one of the given values (case-insensitive). Comma-separated, e.g. provider=openai,anthropic.

Example: ["openai","anthropic"]
has_risk_assessmentbooleanOptional

When true, return only models that have risk scores; when false, only models without them.

Example: true
risk_assessment_completebooleanOptional

When true, return only models whose risk assessment is complete; when false, only models whose assessment is missing or partial.

Example: true
last_updated_afterstring · date-timeOptional

Return only models whose last_updated is after this date and time. last_updated is when the model's data was last updated in Snyk's Risk Database.

Example: 2025-01-01T00:00:00Z
model_namestring · min: 1Optional

Return only the model with this name: its source ID, an alias, or a provider-prefixed name, for example, openai/gpt-4. Matching is case-insensitive.

Example: meta-llama/Llama-3.1-8B-Instruct
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
meta_countstring · enumOptional

Include a count of the total matching items in the response meta

Example: withPossible values:
Responses
200

The models have been successfully retrieved.

application/vnd.api+json
get/tenants/{tenant_id}/risk_db/models
GET /rest/tenants/{tenant_id}/risk_db/models?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "access_info": {
          "api_available": true,
          "cost_tier": "medium",
          "license_name": "Llama-3.1",
          "license_type": "proprietary",
          "self_hostable": true
        },
        "architectures": [
          "LlamaForCausalLM"
        ],
        "capability_assessment": {
          "eci_score": 128.5
        },
        "context_length": 131072,
        "country_of_origin": "US",
        "has_risk_assessment": true,
        "inputs": [
          "text"
        ],
        "last_updated": "2024-09-25T17:00:57Z",
        "model_family": "llama-3-1",
        "model_type": "llama",
        "model_variant": "llama-3-1-8b-instruct",
        "outputs": [
          "text"
        ],
        "parameters": "8B",
        "pipeline_tag": "text-generation",
        "provider": "meta",
        "provider_name": "Meta Llama",
        "release_date": "2024-07-18T08:56:00Z",
        "risk_assessment": [
          {
            "attacker_goals": [
              {
                "name": "insecure_code_generation",
                "score": 579
              }
            ],
            "name": "code_generation",
            "score": 579
          }
        ],
        "risk_assessment_complete": true,
        "source_id": "meta-llama/Llama-3.1-8B-Instruct",
        "source_url": "https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct",
        "tasks": [
          "text-generation"
        ]
      },
      "id": "0b7a2c1e-5d3f-4e8a-9c6b-1f2e3d4c5b6a",
      "type": "model"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  },
  "meta": {
    "count": 42,
    "risk_taxonomy": {
      "categories": [
        {
          "description": "Does it compromise code security?",
          "display_name": "Code Security",
          "name": "code_security",
          "sub_categories": [
            {
              "attacker_goals": [
                {
                  "description": "Generate code containing security vulnerabilities when asked for help with coding tasks",
                  "display_name": "Insecure code generation",
                  "name": "insecure_code_generation",
                  "taxonomy_mappings": {
                    "LLM": [
                      "LLM05"
                    ]
                  }
                }
              ],
              "description": "Vulnerabilities introduced when the agent writes code",
              "display_name": "Code Generation",
              "name": "code_generation"
            }
          ]
        }
      ]
    }
  }
}

Get a model (Early Access)

get

Get a single AI model from Snyk's Risk Database by ID, with its metadata and risk scores. To look a model up by name, list models with the model_name filter.

Risk scores, capability scores, licensing, and country of origin are returned only if your tenant is entitled to Evo Risk Intelligence. Otherwise, these fields are empty or omitted.

Required permissions

  • View Tenant Details (tenant.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Tenant ID

Example: e4a039e5-968b-4f1a-b190-caf3514243b5
model_idstring · uuidRequired

The ID of the model in Snyk's Risk Database.

Example: 0b7a2c1e-5d3f-4e8a-9c6b-1f2e3d4c5b6a
Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
200

The model has been successfully retrieved.

application/vnd.api+json
get/tenants/{tenant_id}/risk_db/models/{model_id}
GET /rest/tenants/{tenant_id}/risk_db/models/{model_id}?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "attributes": {
      "access_info": {
        "api_available": true,
        "cost_tier": "medium",
        "license_name": "Llama-3.1",
        "license_type": "proprietary",
        "self_hostable": true
      },
      "architectures": [
        "LlamaForCausalLM"
      ],
      "capability_assessment": {
        "eci_score": 128.5
      },
      "context_length": 131072,
      "country_of_origin": "US",
      "has_risk_assessment": true,
      "inputs": [
        "text"
      ],
      "last_updated": "2024-09-25T17:00:57Z",
      "model_family": "llama-3-1",
      "model_type": "llama",
      "model_variant": "llama-3-1-8b-instruct",
      "outputs": [
        "text"
      ],
      "parameters": "8B",
      "pipeline_tag": "text-generation",
      "provider": "meta",
      "provider_name": "Meta Llama",
      "release_date": "2024-07-18T08:56:00Z",
      "risk_assessment": [
        {
          "attacker_goals": [
            {
              "name": "insecure_code_generation",
              "score": 579
            }
          ],
          "name": "code_generation",
          "score": 579
        }
      ],
      "risk_assessment_complete": true,
      "source_id": "meta-llama/Llama-3.1-8B-Instruct",
      "source_url": "https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct",
      "tasks": [
        "text-generation"
      ]
    },
    "id": "0b7a2c1e-5d3f-4e8a-9c6b-1f2e3d4c5b6a",
    "type": "model"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource",
    "last": "https://example.com/api/resource",
    "next": "https://example.com/api/resource",
    "prev": "https://example.com/api/resource",
    "related": "https://example.com/api/resource",
    "self": "https://example.com/api/resource"
  },
  "meta": {
    "risk_taxonomy": {
      "categories": [
        {
          "description": "Does it compromise code security?",
          "display_name": "Code Security",
          "name": "code_security",
          "sub_categories": [
            {
              "attacker_goals": [
                {
                  "description": "Generate code containing security vulnerabilities when asked for help with coding tasks",
                  "display_name": "Insecure code generation",
                  "name": "insecure_code_generation",
                  "taxonomy_mappings": {
                    "LLM": [
                      "LLM05"
                    ]
                  }
                }
              ],
              "description": "Vulnerabilities introduced when the agent writes code",
              "display_name": "Code Generation",
              "name": "code_generation"
            }
          ]
        }
      ]
    }
  }
}

Last updated

Was this helpful?