|
| 1 | +--- |
| 2 | +title: anthropic |
| 3 | +hide_title: false |
| 4 | +hide_table_of_contents: false |
| 5 | +keywords: |
| 6 | + - anthropic |
| 7 | + - stackql |
| 8 | + - infrastructure-as-code |
| 9 | + - configuration-as-data |
| 10 | + - cloud inventory |
| 11 | +description: Query, deploy, and manage Anthropic resources using SQL. |
| 12 | +custom_edit_url: null |
| 13 | +image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png |
| 14 | +id: anthropic-doc |
| 15 | +slug: /providers/anthropic |
| 16 | +--- |
| 17 | + |
| 18 | +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; |
| 19 | + |
| 20 | +AI models including Claude for advanced language understanding and generation. |
| 21 | + |
| 22 | +:::info Provider Summary (v24.10.00267) |
| 23 | + |
| 24 | +<div class="row"> |
| 25 | +<div class="providerDocColumn"> |
| 26 | +<span>total services: <b>1</b></span><br /> |
| 27 | +<span>total methods: <b>2</b></span><br /> |
| 28 | +</div> |
| 29 | +<div class="providerDocColumn"> |
| 30 | +<span>total resources: <b>2</b></span><br /> |
| 31 | +<span>total selectable resources: <b>2</b></span><br /> |
| 32 | +</div> |
| 33 | +</div> |
| 34 | + |
| 35 | +::: |
| 36 | + |
| 37 | +See also: |
| 38 | +[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry) |
| 39 | +* * * |
| 40 | + |
| 41 | +## Installation |
| 42 | + |
| 43 | +To pull the latest version of the `anthropic` provider, run the following command: |
| 44 | + |
| 45 | +```bash |
| 46 | +REGISTRY PULL anthropic; |
| 47 | +``` |
| 48 | +> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry). |
| 49 | +
|
| 50 | +## Authentication |
| 51 | + |
| 52 | +The following system environment variables are used for authentication by default: |
| 53 | + |
| 54 | +- <CopyableCode code="ANTHROPIC_API_KEY" /> - Anthropic API key (see <a href="https://docs.anthropic.com/claude/reference/getting-started-with-the-api">How to Create an Anthropic API Key</a>) |
| 55 | + |
| 56 | +These variables are sourced at runtime (from the local machine or as CI variables/secrets). |
| 57 | + |
| 58 | +<details> |
| 59 | + |
| 60 | +<summary>Using different environment variables</summary> |
| 61 | + |
| 62 | +To use different environment variables (instead of the defaults), use the `--auth` flag of the `stackql` program. For example: |
| 63 | + |
| 64 | +```bash |
| 65 | + |
| 66 | +AUTH='{ "anthropic": { "type": "bearer", "credentialsenvvar": "MY_ANTHROPIC_API_KEY" }}' |
| 67 | +stackql shell --auth="${AUTH}" |
| 68 | + |
| 69 | +``` |
| 70 | +or using PowerShell: |
| 71 | + |
| 72 | +```powershell |
| 73 | +
|
| 74 | +$Auth = "{ 'anthropic': { 'type': 'bearer', 'credentialsenvvar': 'MY_ANTHROPIC_API_KEY' }}" |
| 75 | +stackql.exe shell --auth=$Auth |
| 76 | + |
| 77 | +``` |
| 78 | +</details> |
| 79 | + |
| 80 | +## Services |
| 81 | +<div class="row"> |
| 82 | +<div class="providerDocColumn"> |
| 83 | +<a href="/providers/anthropic/messages/">messages</a><br /> |
| 84 | +</div> |
| 85 | +<div class="providerDocColumn"> |
| 86 | +</div> |
| 87 | +</div> |
0 commit comments