> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# source

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `source`

## Meaning and placement

### → secrets · additionalProperties

Where the secret lives · never an inline value (spec/01-envelope.md §secrets).

| Property | Declaration |
| - | - |
| Requirement | Required in this object |
| Schema location | `/properties/secrets/additionalProperties/properties/source` |
| enum | declaration below |

<details>
  <summary>`enum` schema declaration (spec source, not a lesson)</summary>

  ```json theme={"system"}
  [
    "env",
    "file"
  ]
  ```
</details>

**In the same object:** [egress](https://docs.nika.sh/reference/language/words/egress.md) · [key](https://docs.nika.sh/reference/language/words/key.md) · [path](https://docs.nika.sh/reference/language/words/path.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/schemas/workflow.schema.json)

### → secrets · additionalProperties · allOf · 0 · if

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/properties/secrets/additionalProperties/allOf/0/if/properties/source` |
| const | `"file"` |

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/schemas/workflow.schema.json)

### infer → vision · items

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/infer/properties/vision/items/properties/source` |
| type | `"string"` |
| enum | declaration below |

<details>
  <summary>`enum` schema declaration (spec source, not a lesson)</summary>

  ```json theme={"system"}
  [
    "file",
    "url"
  ]
  ```
</details>

**In the same object:** [path](https://docs.nika.sh/reference/language/words/path.md) · [url](https://docs.nika.sh/reference/language/words/url.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/api-upload-and-create.nika`, source lines 42–51. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}

secrets:
  API_KEY:
    source: env
    key: EXAMPLE_API_KEY            # SLOT: the OS env var holding the key
    egress:
      - to: "nika:fetch"            # the send · default-deny otherwise
      - to: "outputs"               # the return value derives from the authed response

permits:                            # the blast radius · default-deny once present
```

### Templates containing this field

| Template | Source |
| - | - |
| `templates/api-upload-and-create.nika` | [Line 45](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/api-upload-and-create.nika#L45) |
| `templates/chain.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/chain.nika#L33) |
| `templates/classify-and-route.nika` | [Line 65](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/classify-and-route.nika#L65) |
| `templates/gate-and-act.nika` | [Line 44](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/gate-and-act.nika#L44) |
| `templates/human-gated-ship.nika` | [Line 78](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/human-gated-ship.nika#L78) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:source`. Spec revision: [`5c40ba456c53`](https://github.com/supernovae-st/nika-spec/tree/5c40ba456c53a4ab663a949d44003078e161305d).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.