ai& SDK
The official ai& SDKs are generated from the public OpenAPI spec and ship full type definitions. They cover the same OpenAI-compatible surface as the rest of the platform.
pip install aiandimport aiand
configuration = aiand.Configuration(access_token="sk-your-aiand-api-key")client = aiand.OpenaiApi(aiand.ApiClient(configuration))
models = client.list_models()print(models.data[0].id)npm install @aiand/sdkimport { Configuration, OpenaiApi } from "@aiand/sdk";
const client = new OpenaiApi( new Configuration({ accessToken: "sk-your-aiand-api-key" }),);
const models = await client.listModels();console.log(models.data[0].id);Chat completion
Section titled “Chat completion”response = client.create_chat_completion( aiand.CreateChatCompletionRequest.from_dict({ "model": "deepseek-ai/deepseek-v4-flash", "messages": [{"role": "user", "content": "Hello"}], }))print(response.choices[0].message.content)const response = await client.createChatCompletion({ createChatCompletionRequest: { model: "deepseek-ai/deepseek-v4-flash", messages: [{ role: "user", content: "Hello" }], },});console.log(response.choices[0].message.content);Responses
Section titled “Responses”response = client.create_response( aiand.CreateResponseRequest( model="deepseek-ai/deepseek-v4-flash", input=aiand.ResponseInput("Hello"), ))print(response.output[0].content[0].text)const response = await client.createResponse({ createResponseRequest: { model: "deepseek-ai/deepseek-v4-flash", input: "Hello", },});console.log(response.output);