SDK quickstart
Generated TypeScript, Python, and Go clients. Use injects. Never GetSecret.
SDK quickstart
Generated from the same OpenAPI contract as the API reference.
Do not handwrite clients. pnpm run sdk:generate.
TypeScript
pnpm add @vortex-api/veil
import { createClient, listItems, useItem } from "@vortex-api/veil";
const client = createClient({
baseUrl: "https://veil.nyc",
headers: { Authorization: `Bearer ${process.env.VEIL_OIDC_TOKEN}` },
});
const listed = await listItems({ client });
const used = await useItem({
client,
body: {
item: "stripe",
url: "https://api.stripe.com/v1/customers",
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "bot@veil.nyc" }),
},
});
Python
pip install vortex-api-veil
import os
import veil
configuration = veil.Configuration(host="https://veil.nyc")
configuration.access_token = os.environ["VEIL_OIDC_TOKEN"]
api = veil.AgentApi(veil.ApiClient(configuration))
api.list_items()
api.use_item(veil.UseRequest(item="stripe", url="https://api.stripe.com/v1/customers"))
Go
go get github.com/VortexNYC/veil/sdks/go
cfg := veil.NewConfiguration()
cfg.Host = "veil.nyc"
cfg.Scheme = "https"
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("VEIL_OIDC_TOKEN"))
client := veil.NewAPIClient(cfg)
_, _, _ = client.AgentAPI.ListItems(context.Background()).Execute()
What the SDK does not do
It does not reveal vault material. run, gen, and item write stay on the owner CLI.