Models
Astrodyne exposes a canonical model catalog. List the models your key can
use with GET /v1/models, then pass an ID as the
model field.
Listing your models
curl
curl https://api.astrodyne.ai/v1/models \ -H "Authorization: Bearer $ASTRODYNE_API_KEY"
Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.astrodyne.ai/v1",
api_key=os.environ["ASTRODYNE_API_KEY"],
)
for model in client.models.list():
print(model.id)
JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.astrodyne.ai/v1",
apiKey: process.env.ASTRODYNE_API_KEY,
});
for await (const model of client.models.list()) {
console.log(model.id);
}
The response is the OpenAI list shape:
JSON
{
"object": "list",
"data": [
{ "id": "YOUR_MODEL_ID", "object": "model", "owned_by": "astrodyne" }
]
}
Why the list can vary
/v1/models returns exactly the models the authenticated key may
request — the account's available catalog, minus anything excluded by that
key's optional model restriction list. If a model is not in your list,
requesting it returns a clear error.
Choosing and using a model
Browse the catalog on the Models page, try a model in the Playground, then use the same ID in your code. Model IDs are stable canonical identifiers, so the ID you test with is the ID you ship with.