Workshop Overview
Workshop Part 2
4 min
integrate with your application code you’ve validated everything in the ui now you’ll send real traffic from your code through the amberflo unified interface by the end of this section, you will make a successful external api call see usage update in real time confirm workload level attribution use the api examples open the models & routing and navigate to docid\ qanqswvjq pd8pq0pcitb you will see a python example a curl example use whichever matches your environment the python example is the fastest way to get started make your first code based call copy the example into a new file update two values your workload key the model alias you want to useexample simple model run the script if you receive a response, the call succeeded you are now sending traffic through the amberflo unified interface from outside the ui the example uses the chat completions endpoint additional endpoints, including streaming, are being added in the coming weeks confirm usage and cost updates return to ai spend and refresh the page you should now see increased request counts token usage model level attribution cost accumulation navigate to usage to view request and token details showbacks to verify attribution to customer support bot the key you used determines where usage and cost are attributed nothing else needs to change in your application what this means at this point your application can call any configured model all providers share a consistent api structure usage is automatically tracked spend is attributed by workload you now have a production ready entry point for ai traffic next scale this across multiple applications and see how attribution works across workloads
