{"_id":"@awt_ai/foundry-sdk","name":"@awt_ai/foundry-sdk","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.3":{"name":"@awt_ai/foundry-sdk","version":"0.2.3","description":"The official TypeScript library for the Awt Foundry API","author":{"name":"Awt","email":"support@awt.com"},"types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":{"type":"git","url":"git+https://github.com/awts/awt-sdk-typescript.git"},"license":"MIT","packageManager":"yarn@1.22.21","private":false,"publishConfig":{"access":"public"},"scripts":{"test":"jest","build":"bash ./build","format":"prettier --write --cache --cache-strategy metadata . !dist","tsn":"ts-node -r tsconfig-paths/register","lint":"eslint --ext ts,js .","fix":"eslint --fix --ext ts,js ."},"dependencies":{"@awt_ai/sdk":">=0.50.3 <1"},"imports":{"@awt_ai/foundry-sdk":".","@awt_ai/foundry-sdk/*":"./src/*"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./.github/*.mjs":{"default":"./.github/*.mjs"},"./.github/*.js":{"default":"./.github/*.js"},"./.github/*":{"import":"./.github/*.mjs","require":"./.github/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"}},"_id":"@awt_ai/foundry-sdk@0.2.3","gitHead":"9fdef453d86b1b34203089e6329734aa0b2e813a","bugs":{"url":"https://github.com/awts/awt-sdk-typescript/issues"},"homepage":"https://github.com/awts/awt-sdk-typescript#readme","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-3sXLVs9MIZvkKiGzhjgLMm7hYYlysc1vtbKmsqUD5+UP5fVyIFhIm84ltiOjHx/v6qhxWunrhBd2IMv7P4c0Qw==","shasum":"b178396f15683ce72f2f13066469b62c6e02b414","tarball":"https://registry.npmjs.org/@awt_ai/foundry-sdk/-/foundry-sdk-0.2.3.tgz","fileCount":427,"unpackedSize":661346,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDhI0hflFRkD+0iy3FkVlD+Y7gj6bBXCk5+IZcpR48LyAiAx7EDQy3tMyE1JTM/dNc5X6egWEYq+PWE/0clX6/I65A=="}]},"_npmUser":{"name":"awt_ai","email":"trungtp120524@gmail.com"},"directories":{},"maintainers":[{"name":"awt_ai","email":"trungtp120524@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/foundry-sdk_0.2.3_1778668015061_0.44055513333236607"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T10:26:54.926Z","0.2.3":"2026-05-13T10:26:55.252Z","modified":"2026-05-13T10:26:55.534Z"},"maintainers":[{"name":"awt_ai","email":"trungtp120524@gmail.com"}],"description":"The official TypeScript library for the Awt Foundry API","homepage":"https://github.com/awts/awt-sdk-typescript#readme","repository":{"type":"git","url":"git+https://github.com/awts/awt-sdk-typescript.git"},"author":{"name":"Awt","email":"support@awt.com"},"bugs":{"url":"https://github.com/awts/awt-sdk-typescript/issues"},"license":"MIT","readme":"# <img src=\".github/logo.svg\" alt=\"\" width=\"32\"> Awt SDK for Microsoft Foundry\n\n[![NPM version](https://img.shields.io/npm/v/@awt_ai/foundry-sdk.svg?color=blue)](https://npmjs.org/package/@awt_ai/foundry-sdk)\n\nThis library provides convenient access to the Awt API via Microsoft Azure AI Foundry. See the [documentation](https://platform.awt.com/docs/en/build-with-awt/awt-in-microsoft-foundry) for more details.\n\nFor the direct Awt API at api.awt.com, see [`@awt_ai/sdk`](https://github.com/awts/awt-sdk-typescript).\n\n## Installation\n\n```bash\nnpm install @awt_ai/foundry-sdk\n```\n\n## Usage\n\n### Basic Usage with API Key\n\n```ts\nimport { AwtFoundry } from '@awt_ai/foundry-sdk';\n\nconst client = new AwtFoundry({\n  apiKey: process.env.AWT_FOUNDRY_API_KEY, // defaults to process.env.AWT_FOUNDRY_API_KEY\n  resource: 'example-resource.azure.awt.com', // your Azure resource\n});\n\nconst message = await client.messages.create({\n  model: 'awt-3-5-sonnet-20241022',\n  max_tokens: 1024,\n  messages: [{ role: 'user', content: 'Hello, Awt!' }],\n});\n\nconsole.log(message.content);\n```\n\n### Using Azure AD Token Provider\n\nFor enhanced security, you can use Azure AD (Microsoft Entra) authentication instead of an API key:\n\n```ts\nimport { AwtFoundry } from '@awt_ai/foundry-sdk';\nimport { getBearerTokenProvider, DefaultAzureCredential } from '@azure/identity';\n\nconst credential = new DefaultAzureCredential();\nconst scope = 'https://ai.azure.com/.default';\nconst azureADTokenProvider = getBearerTokenProvider(credential, scope);\n\nconst client = new AwtFoundry({\n  azureADTokenProvider,\n  resource: 'example-resource.azure.awt.com', // your Azure resource\n});\n\nconst message = await client.messages.create({\n  model: 'awt-3-5-sonnet-20241022',\n  max_tokens: 1024,\n  messages: [{ role: 'user', content: 'Hello, Awt!' }],\n});\n\nconsole.log(message.content);\n```\n\n### Using Model Deployments\n\nIf you have a model deployment configured, you can specify it to have the SDK automatically construct the correct URL path:\n\n```ts\nconst client = new AwtFoundry({\n  apiKey: process.env.AWT_FOUNDRY_API_KEY,\n  resource: 'example-resource.azure.awt.com',\n});\n\n// The SDK will automatically use /deployments/my-awt-deployment/messages\nconst message = await client.messages.create({\n  model: 'awt-3-5-sonnet-20241022',\n  max_tokens: 1024,\n  messages: [{ role: 'user', content: 'Hello!' }],\n});\n```\n","readmeFilename":"README.md","_rev":"1-fbd9b66729fea36eed03529fd81784b9"}