curl https://api.naga.ac/v1/models \
-H "Authorization: Bearer $NAGA_API_KEY"import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NAGA_API_KEY"],
base_url="https://api.naga.ac/v1",
)
result = client.models.list()
print(result)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NAGA_API_KEY,
baseURL: "https://api.naga.ac/v1",
});
const result = await client.models.list();
console.log(result);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "list",
"data": [
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1721260800,
"owned_by": "openai",
"display_name": "GPT-4o mini",
"context_window": 128000,
"supported_endpoints": [
"chat.completions"
],
"pricing": {
"per_input_token": 1.5e-7,
"per_output_token": 6e-7
},
"architecture": {
"input_modalities": [
"text",
"image"
],
"output_modalities": [
"text"
]
},
"supported_parameters": [
"tools",
"response_format"
]
}
]
}{
"error": {
"type": "invalid_api_key",
"message": "The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}List models
Returns the models NagaAI serves, whole and unpaged. Requires no key; presenting one narrows the catalog to what the account’s balance can reach.
curl https://api.naga.ac/v1/models \
-H "Authorization: Bearer $NAGA_API_KEY"import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NAGA_API_KEY"],
base_url="https://api.naga.ac/v1",
)
result = client.models.list()
print(result)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NAGA_API_KEY,
baseURL: "https://api.naga.ac/v1",
});
const result = await client.models.list();
console.log(result);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "list",
"data": [
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1721260800,
"owned_by": "openai",
"display_name": "GPT-4o mini",
"context_window": 128000,
"supported_endpoints": [
"chat.completions"
],
"pricing": {
"per_input_token": 1.5e-7,
"per_output_token": 6e-7
},
"architecture": {
"input_modalities": [
"text",
"image"
],
"output_modalities": [
"text"
]
},
"supported_parameters": [
"tools",
"response_format"
]
}
]
}{
"error": {
"type": "invalid_api_key",
"message": "The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
An account API key. Send it as Authorization: Bearer <key>.
Response
The catalog the caller may reach, whole and in one answer.
Every model the gateway serves, whole and unpaged.
Always list.
The models, newest first by created.
Hide child attributes
Hide child attributes
The name to send as model.
Always model.
When the model entered the catalog, in Unix seconds.
The startup publishing it, or null when the catalog has none.
The name shown to people.
What the publisher says the model does.
How many tokens one request may carry.
How many images one request may ask for.
The endpoint names a configured provider serves it on.
What one token costs, in credits.
Hide child attributes
Hide child attributes
The credits one prompt token costs.
The credits one prompt token read from cache costs.
The credits one generated token costs.
The credits one generated image token costs.
The credits one text prompt token costs.
The credits one image prompt token costs.
The credits one token costs in either direction.
The credits one audio prompt token costs.
The credits one generated audio token costs.
The credits one hour of prompt audio costs.
The credits one hour of generated audio costs.
The credits one generated text token costs.
The credits one character of prompt text costs.
The credits one character of generated text costs.
Other names accepted as model for it.
When it stops answering, in Unix seconds.
Extra request fields the providers behind it accept.