Package: air-sdk-python
air-sdk-pythonSDK Installationpipinstallair-sdk-pythonSDK Example UsageExampleimportairfromair.modelsimportshareds=air.Air(bearer_auth="<YOUR_BEARER_TOKEN_HERE>",)req=shared.Call(phone='874.397.6390 x76992',prompt_id=230621,metadata=shared.Metadata(),)res=s.call.initiate_call(req)ifres.objectisnotNone:# handle responsepassAvailable Resources and Operationscallinitiate_call- Initiate a callError HandlingHandling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.Error ObjectStatus CodeContent Typeerrors.InitiateCallResponseBody401application/jsonerrors.InitiateCallCallResponseBody403application/jsonerrors.InitiateCallCallResponseResponseBody404application/jsonerrors.InitiateCallCallResponse422ResponseBody422application/jsonerrors.InitiateCallCallResponse500ResponseBody500application/jsonerrors.SDKError4x-5xx/Exampleimportairfromair.modelsimportshareds=air.Air(bearer_auth="<YOUR_BEARER_TOKEN_HERE>",)req=shared.Call(phone='874.397.6390 x76992',prompt_id=230621,metadata=shared.Metadata(),)res=Nonetry:res=s.call.initiate_call(req)excepterrors.InitiateCallResponseBodyase:print(e)# handle exceptionraise(e)excepterrors.InitiateCallCallResponseBodyase:print(e)# handle exceptionraise(e)excepterrors.InitiateCallCallResponseResponseBodyase:print(e)# handle exceptionraise(e)excepterrors.InitiateCallCallResponse422ResponseBodyase:print(e)# handle exceptionraise(e)excepterrors.InitiateCallCallResponse500ResponseBodyase:print(e)# handle exceptionraise(e)excepterrors.SDKErrorase:print(e)# handle exceptionraise(e)ifres.objectisnotNone:# handle responsepassServer SelectionSelect Server by IndexYou can override the default server globally by passing a server index to theserver_idx: intoptional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:#ServerVariables0https://chat.air.ai/api/v1NoneExampleimportairfromair.modelsimportshareds=air.Air(server_idx=0,bearer_auth="<YOUR_BEARER_TOKEN_HERE>",)req=shared.Call(phone='874.397.6390 x76992',prompt_id=230621,metadata=shared.Metadata(),)res=s.call.initiate_call(req)ifres.objectisnotNone:# handle responsepassOverride Server URL Per-ClientThe default server can also be overridden globally by passing a URL to theserver_url: stroptional parameter when initializing the SDK client instance. For example:importairfromair.modelsimportshareds=air.Air(server_url="https://chat.air.ai/api/v1",bearer_auth="<YOUR_BEARER_TOKEN_HERE>",)req=shared.Call(phone='874.397.6390 x76992',prompt_id=230621,metadata=shared.Metadata(),)res=s.call.initiate_call(req)ifres.objectisnotNone:# handle responsepassCustom HTTP ClientThe Python SDK makes API calls using therequestsHTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a customrequests.Sessionobject.For example, you could specify a header for every request that this sdk makes as follows:importairimportrequestshttp_client=requests.Session()http_client.headers.update({'x-custom-header':'someValue'})s=air.Air(client:http_client)AuthenticationPer-Client Security SchemesThis SDK supports the following security scheme globally:NameTypeSchemebearer_authhttpHTTP BearerTo authenticate with the API thebearer_authparameter must be set when initializing the SDK client instance. For example:importairfromair.modelsimportshareds=air.Air(bearer_auth="<YOUR_BEARER_TOKEN_HERE>",)req=shared.Call(phone='874.397.6390 x76992',prompt_id=230621,metadata=shared.Metadata(),)res=s.call.initiate_call(req)ifres.objectisnotNone:# handle responsepassMaturityThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.ContributionsWhile we value open-source contributions to this SDK, this library is generated programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!SDK Created bySpeakeasy