> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://nemo-platform.docs.buildwithfern.com/nemo/platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://nemo-platform.docs.buildwithfern.com/nemo/platform/_mcp/server.

# Manage Audit Targets

<a id="auditor-targets" />

An `AuditTarget` identifies the model under test. It pairs a garak generator class (`type`) with a model identifier (`model`) and a generator-specific options dict (`options`). Targets are persisted in the NeMo Platform entity store and referenced by name from `client.auditor.run(...)`.

## What an AuditTarget Holds

| Field         | Description                                                                                                                                                                                                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type`        | A fully-qualified [garak generator class](https://reference.garak.ai/en/latest/generators.html), such as `nim.NVOpenAIChat`, `openai.OpenAIGenerator`, `rest.RestGenerator`, or `test.Blank`.                                                                                                                |
| `model`       | The provider's model identifier passed through to garak (for example, `meta/llama-3.1-8b-instruct`).                                                                                                                                                                                                         |
| `options`     | A nested dict whose top-level key is the generator namespace (`nim`, `openai`, `rest`, ...). Contents are passed through to garak unchanged, with one exception: the [`nmp_uri_spec`](/documentation/vulnerability-scanning/targets/inference-gateway) sentinel is resolved to a concrete `uri` at run time. |
| `description` | Optional free-form description shown in listings.                                                                                                                                                                                                                                                            |

See [Target Schema](/documentation/vulnerability-scanning/targets/schema) for the full field reference.

## Common Target Types

### NIM via Inference Gateway

Audit a NIM (or any OpenAI-compatible chat endpoint) routed through a NeMo Platform provider:

```python
target = client.auditor.targets.create(
    workspace="default",
    name="llama-31-8b",
    type="nim.NVOpenAIChat",
    model="meta/llama-3.1-8b-instruct",
    options={
        "nim": {
            "max_tokens": 1024,
            "nmp_uri_spec": {
                "inference_gateway": {
                    "workspace": "default",
                    "provider": "build",
                },
            },
        },
    },
)
```

The `nmp_uri_spec` block resolves to a concrete `uri` at run time. See [Inference Gateway](/documentation/vulnerability-scanning/targets/inference-gateway) for details.

### OpenAI-compatible Endpoint

For a vanilla OpenAI-compatible endpoint routed through a provider:

```python
target = client.auditor.targets.create(
    workspace="default",
    name="gpt-4o-audit",
    type="openai.OpenAIGenerator",
    model="gpt-4o",
    options={
        "openai": {
            "max_tokens": 1024,
            "seed": 42,
            "nmp_uri_spec": {
                "inference_gateway": {
                    "workspace": "default",
                    "provider": "openai-provider",
                },
            },
        },
    },
)
```

### Blank Target (Smoke Test)

`test.Blank` returns the empty string for every request — useful for verifying that an audit configuration is well-formed without making network calls:

```python
target = client.auditor.targets.create(
    workspace="default",
    name="smoke",
    type="test.Blank",
    model="ignored",
)
```

`test.Blank` ignores `model`, but the field is still required by the schema.

## List Targets

```python
listing = client.auditor.targets.list(workspace="default")
for entry in listing["data"]:
    print(entry["name"], entry["type"], entry["model"])
```

`list()` returns the standard envelope (`data`, `pagination`, `sort`); pass `page`, `page_size`, and `sort` keyword arguments for pagination.

## Retrieve a Target

```python
target = client.auditor.targets.get(workspace="default", name="llama-31-8b")
```

## Update a Target

`update()` replaces every field — pass the fields you want to keep alongside the ones you are changing.

```python
updated = client.auditor.targets.update(
    workspace="default",
    name="llama-31-8b",
    type="nim.NVOpenAIChat",
    model="meta/llama-3.3-70b-instruct",
    options={
        "nim": {
            "max_tokens": 2048,
            "nmp_uri_spec": {
                "inference_gateway": {"workspace": "default", "provider": "build"},
            },
        },
    },
)
```

## Delete a Target

```python
client.auditor.targets.delete(workspace="default", name="llama-31-8b")
```