List models
GET
/v1/models
const url = 'https://api.aderra.ai/v1/models';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.aderra.ai/v1/models \ --header 'Authorization: Bearer <token>'The chat models your key can call: exactly the ids the chat endpoints accept and bill. Image, video and speech models are not listed here.
Each entry carries input_modalities (an Aderra addition that OpenAI clients ignore):
a model whose list lacks image cannot read image inputs. The body also carries a
models array, a catalogue in the format Codex reads; other clients can ignore it.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The model list.
Media typeapplication/json
object
object
string
data
Array<object>
object
id
string
object
string
created
integer
owned_by
string
input_modalities
Array<string>
models
The same models in Codex’s catalogue format.
Array<object>
object
key
additional properties
any
Example
{ "object": "list", "data": [ { "id": "glm-5.3-flash", "object": "model", "created": 0, "owned_by": "aderra", "input_modalities": [ "text" ] } ]}The key is missing, unknown or revoked: {"error": "unauthorized"}.
Media typeapplication/json
Media and a few early refusals send error as a plain string, sometimes with a message for a person.
object
error
required
string
message
string
Example
{ "error": "unauthorized"}