Skip to main content
GET
/
api
/
model
/
default
Get default model
curl --request GET \
  --url https://api.example.com/api/model/default
import requests

url = "https://api.example.com/api/model/default"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/model/default', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/api/model/default",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/api/model/default"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/model/default")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/model/default")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "location": {
    "directory": "<string>",
    "project": {
      "id": "<string>",
      "directory": "<string>"
    },
    "workspaceID": "<string>"
  },
  "data": {
    "id": "<string>",
    "modelID": "<string>",
    "providerID": "<string>",
    "name": "<string>",
    "capabilities": {
      "tools": true,
      "input": [
        "<string>"
      ],
      "output": [
        "<string>"
      ]
    },
    "variants": [
      {
        "id": "<string>",
        "settings": {},
        "headers": {},
        "body": {}
      }
    ],
    "time": {
      "released": 123
    },
    "cost": [
      {
        "input": 123,
        "output": 123,
        "cache": {
          "read": 123,
          "write": 123
        },
        "tier": {
          "type": "context",
          "size": 123
        }
      }
    ],
    "enabled": true,
    "limit": {
      "context": 123,
      "output": 123,
      "input": 123
    },
    "family": "<string>",
    "package": "<string>",
    "settings": {},
    "headers": {},
    "body": {}
  }
}
{
  "_tag": "InvalidRequestError",
  "message": "<string>",
  "kind": "<string>",
  "field": "<string>"
}
{
  "_tag": "UnauthorizedError",
  "message": "<string>"
}
{
  "_tag": "ServiceUnavailableError",
  "message": "<string>",
  "service": "<string>"
}

Query Parameters

location
object | null

Response

Success

location
object
required
data
object | null
required