varapiKey=Environment.GetEnvironmentVariable("SHOTSTACK_API_KEY")is{Length:>0}value?value:thrownewAssertInconclusiveException("SHOTSTACK_API_KEY environment variable is not found.");usingvarclient=newShotstackClient(apiKey);// The client has 4 sub-clients for different APIs.
MeaiTools
1 2 3 4 5 6 7 8 9101112131415
varapiKey=Environment.GetEnvironmentVariable("SHOTSTACK_API_KEY")is{Length:>0}value?value:thrownewAssertInconclusiveException("SHOTSTACK_API_KEY environment variable is not found.");usingvarclient=newShotstackClient(apiKey);// Create tools for render status, templates, probing, and assets.vargetRenderStatusTool=client.AsGetRenderStatusTool();varlistTemplatesTool=client.AsListTemplatesTool();varprobeTool=client.AsProbeTool();varlistAssetsTool=client.AsListAssetsTool();// These tools can be passed to any IChatClient that supports function calling.vartools=new[]{getRenderStatusTool,listTemplatesTool,probeTool,listAssetsTool};