# Get base model

GET

/v2/workspaces/{workspace\_id}/base-models/{base\_model\_id}

```bash
curl --request GET \
  --url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id \
  --header 'Authorization: Bearer <token>'
```

```python
import requests


url = "https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id"


headers = {"Authorization": "Bearer <token>"}


response = requests.get(url, headers=headers)


print(response.json())
```

```js
const url = 'https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id';
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);
}
```

```go
package main


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


func main() {


  url := "https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id"


  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(res)
  fmt.Println(string(body))


}
```

```php
<?php


$curl = curl_init();


curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);


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


curl_close($curl);


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

```java
OkHttpClient client = new OkHttpClient();


Request request = new Request.Builder()
  .url("https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id")
  .get()
  .addHeader("Authorization", "Bearer <token>")
  .build();


Response response = client.newCall(request).execute();
```

```ruby
require 'uri'
require 'net/http'


url = URI("https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id")


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


request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'


response = http.request(request)
puts response.read_body
```

```csharp
var client = new RestClient("https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer <token>");
var response = client.Execute(request);
```

* Layer API

> **Changed in v2.** This endpoint’s contract differs from v1\. See the [v2 migration guide](/docs/migration) for the request and response changes before you switch.

Get a base model’s capabilities, pricing, and typical generation time.

## Authorizations

* **[bearerAuth](/docs/v2/rest-api#bearerauth)**
* **[oauth2](/docs/v2/rest-api#oauth2)**

## Parameters

### Path Parameters

**workspace\_id**

required

_Workspace Id_

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

**base\_model\_id**

required

_Base Model Id_

The base model, named by the id the list endpoint returns, or by its slug, display name, or alias.

string

The base model, named by the id the list endpoint returns, or by its slug, display name, or alias.

## Responses

### 200

Successful Response

_BaseModelDetail_object

**base\_model\_id**

required

_Base Model Id_

Base model identifier, e.g. flux-dev — pass it as `base_model_id`.

string

**name**

required

_Name_

Display name.

string

**aliases**

_Aliases_

Community nicknames this model is also known by.

Array<string>

default: 

**modality**

required

_Modality_

Image, video, three\_d, or audio.

string

Allowed values: text image audio video three\_d playable

**description**

Any of:

**string**

string

**null**

null

**price\_per\_unit**

Any of:

**number**

number

**null**

null

**price\_unit**

Any of:

**string**

string

**null**

null

**inference\_timing**

required

_Inference Timing_

Typical generation time range, e.g. ‘5-15s’.

string

**capabilities**

required

_BaseModelCapabilitiesREST_

Supported inputs, sizes, and generation features.

object

**session\_modes**

_Session Modes_

Supported modes: create, create\_video, create\_3\_d, create\_speech, create\_sound\_effect, prompt\_edit\_image, etc.

Array<string>

**text\_prompt**

_Text Prompt_

boolean

**text\_prompt\_required**

_Text Prompt Required_

boolean

**negative\_prompt**

_Negative Prompt_

boolean

**seed**

_Seed_

boolean

**inpainting**

_Inpainting_

boolean

**outpainting**

_Outpainting_

boolean

**tileability**

_Tileability_

boolean

**guidance\_file\_types**

_Guidance File Types_

Supported guidance inputs and their per-type file limits. `init_image` is the source image an edit model modifies; `reference_image` supplies subjects to reproduce; `ip_adapter` is legacy IP-Adapter style-only transfer.

Array<object>

_ToolGuidanceFileTypeSupport_object

**type**

required

_Type_

Guidance file type, such as init\_image, reference\_image, first\_frame, pose, or depth.

string

**max\_count**

required

_Max Count_

Maximum number of files of this type accepted by the model.

integer

**duration\_seconds**

_Duration Seconds_

Supported video durations in seconds

Array<integer>

**duration\_seconds\_min**

Any of:

**number**

number

**null**

null

**duration\_seconds\_max**

Any of:

**number**

number

**null**

null

**duration\_seconds\_required**

_Duration Seconds Required_

This model has no default clip length; without duration\_seconds the shortest is used.

boolean

**generate\_audio**

_Generate Audio_

boolean

**lipsync**

_Lipsync_

boolean

**textures**

_Textures_

boolean

**quad\_mesh**

_Quad Mesh_

boolean

**pbr\_materials**

_Pbr Materials_

boolean

**generate\_parts**

_Generate Parts_

boolean

**text\_to\_speech**

_Text To Speech_

boolean

**sound\_effect**

_Sound Effect_

boolean

**camera\_transform**

_Camera Transform_

boolean

**output\_aspect\_ratios**

_Output Aspect Ratios_

Array<string>

**output\_size\_envelope**

Any of:

**string**

string

**null**

null

##### Example

```json
{
  "aliases": [],
  "modality": "text",
  "capabilities": {
    "text_prompt": false,
    "text_prompt_required": false,
    "negative_prompt": false,
    "seed": false,
    "inpainting": false,
    "outpainting": false,
    "tileability": false,
    "duration_seconds_required": false,
    "generate_audio": false,
    "lipsync": false,
    "textures": false,
    "quad_mesh": false,
    "pbr_materials": false,
    "generate_parts": false,
    "text_to_speech": false,
    "sound_effect": false,
    "camera_transform": false
  }
}
```

### 401

Unauthenticated — missing or invalid Bearer token.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 403

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 404

Resource not found.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 409

The request with this `Idempotency-Key` is still running — retry after the number of seconds in `Retry-After`.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 422

Invalid input parameters, or an `Idempotency-Key` reused for a different request.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 429

Rate limited — retry after the number of seconds in `Retry-After`.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 500

Internal server error.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```
