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

# Attention: Create API Key

> Create API Key. Attention Create Api Key reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Create API Key.

<Info>
  Tool ID: `attention_create_api_key`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'attention_create_api_key',
  {
    "name": "Example",
    "orgLevel": true
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute attention_create_api_key --input '{
  "name": "Example",
  "orgLevel": true
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "id": "id_123",
    "name": "Example",
    "organizationUUID": "organization_123",
    "userUUID": "user_123",
    "value": "example",
    "lastSeenAt": "2026-01-15T12:00:00Z"
  }
}
```

Use `deepline tools get attention_create_api_key --json` for the latest machine-readable contract.

## Input reference

Creates a new API key. This endpoint allows you to generate an API key that can be used to authenticate requests to the Attention service.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.name` | `string` | Yes | — | The name of the API key |
| `payload.orgLevel` | `boolean` | Yes | — | Whether the API key is organization-level or user-level |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Creates a new API key. This endpoint allows you to generate an API key that can be used to authenticate requests to the Attention service.",
    "properties": {
      "name": {
        "type": "string",
        "description": "The name of the API key"
      },
      "orgLevel": {
        "type": "boolean",
        "description": "Whether the API key is organization-level or user-level"
      }
    },
    "required": [
      "name",
      "orgLevel"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | Yes | — | The unique identifier of the API key |
| `result.data.name` | `string` | Yes | — | The name of the API key |
| `result.data.organizationUUID` | `string` | Yes | — | The UUID of the organization this API key belongs to, if applicable |
| `result.data.userUUID` | `string` | Yes | — | The UUID of the user this API key belongs to, if applicable |
| `result.data.value` | `string` | Yes | — | The actual API key value |
| `result.data.lastSeenAt` | `string` | Yes | — | The last time this API key was used Format: `date-time`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the API key"
          },
          "name": {
            "type": "string",
            "description": "The name of the API key"
          },
          "organizationUUID": {
            "type": "string",
            "description": "The UUID of the organization this API key belongs to, if applicable"
          },
          "userUUID": {
            "type": "string",
            "description": "The UUID of the user this API key belongs to, if applicable"
          },
          "value": {
            "type": "string",
            "description": "The actual API key value"
          },
          "lastSeenAt": {
            "type": "string",
            "description": "The last time this API key was used",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "lastSeenAt",
          "name",
          "organizationUUID",
          "userUUID",
          "value"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Attention provider guide](/docs/providers/attention/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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