[ SDKs ]
Client libraries for Origin and NextGen.
Install targets and request sketches for every language we plan to ship. API keys are under development — start with Quark and the REST shapes today.
Status
Packages reserved — public installs when API keys ship. Use Quark + REST shapes today.
[ Python ]
Python
Package name reserved — public install when keys ship.
Install
pip install idonaiExample
from idonai import IdonAI
client = IdonAI(api_key="your_api_key")
response = client.models.generate(
model="origin",
messages=[
{"role": "user", "content": "Explain quantum entanglement."}
],
max_tokens=1024,
)
print(response.content)[ TypeScript ]
TypeScript
Package name reserved — public install when keys ship.
Install
npm install @idonai/sdkExample
import { IdonAI } from "@idonai/sdk";
const client = new IdonAI({ apiKey: process.env.IDONAI_API_KEY });
const response = await client.models.generate({
model: "origin",
messages: [
{ role: "user", content: "Explain quantum entanglement." },
],
maxTokens: 1024,
});
console.log(response.content);[ REST ]
REST
Language-agnostic HTTP contract — works today against the documented request shape. Prefer this while SDK packages are reserved.
Request
curl https://api.idonai.com/v1/chat/completions \
-H "Authorization: Bearer $IDONAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "origin",
"messages": [
{"role": "user", "content": "Explain quantum entanglement."}
],
"max_tokens": 1024
}'[ Go ]
Go
Module path reserved — public install when keys ship.
Install
go get github.com/idonai/idonai-goExample
package main
import (
"context"
"fmt"
"github.com/idonai/idonai-go"
)
func main() {
client := idonai.NewClient("your_api_key")
resp, _ := client.Chat.Completions.Create(
context.Background(),
idonai.ChatCompletionRequest{
Model: "origin",
Messages: []idonai.Message{
{Role: "user", Content: "Explain quantum entanglement."},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}[ Java ]
Java
Maven coordinates reserved — public install when keys ship.
Install
implementation 'com.idonai:sdk:0.1.0'Example
import ai.idonai.IdonAI;
import ai.idonai.models.*;
var client = IdonAI.builder()
.apiKey("your_api_key")
.build();
var response = client.models().generate(
GenerateRequest.builder()
.model("origin")
.message("user", "Explain quantum entanglement.")
.maxTokens(1024)
.build()
);
System.out.println(response.content());[ Next ]
Wire the contract, then wait for keys.
The API reference covers chat completions, streaming, and errors. Prototype prompts in Quark with the same model ids.