# 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)**
* **[serviceAccount](/docs/v2/rest-api#serviceaccount)**  
generation:read

## 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 world

**provider**

_Provider_

Slug of the organization behind the model, e.g. openai or bfl, when known.

string

nullable

**description**

_Description_

Short description.

string

nullable

**price\_per\_unit**

_Price Per Unit_

CU cost per measurement unit.

number

nullable

**price\_unit**

_Price Unit_

Measurement unit, e.g. megapixel, second, generation.

string

nullable

**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

**max\_prompt\_chars**

_Max Prompt Chars_

Longest prompt, in characters, the model accepts; null when unbounded.

integer

nullable

**negative\_prompt**

_Negative Prompt_

boolean

**seed**

_Seed_

boolean

**inpainting**

_Inpainting_

boolean

**outpainting**

_Outpainting_

boolean

**tileability**

_Tileability_

boolean

**native\_tileability**

_Native Tileability_

Generates a tileable image by construction when `tileability` is set, rather than through Layer’s seam-repair pass. Cannot be combined with a LoRA style.

boolean

**tile\_grid**

_Tile Grid_

Draws a game tile (isometric or hex) onto a fixed grid when a generation sets `tile_grid`.

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

**max\_duration\_seconds**

_Max Duration Seconds_

Longest single video or audio this slot accepts, in seconds. A cap on the combined length of several files is listed under shared\_guidance\_limits. Null when the model states no cap.

number

nullable

**min\_duration\_seconds**

_Min Duration Seconds_

Shortest video or audio this slot accepts, in seconds; a shorter one is rejected. Null when the model states no floor.

number

nullable

**min\_count**

_Min Count_

Minimum number of files of this type a run must supply. 0 means the input is optional.

integer

0

**shared\_guidance\_limits**

_Shared Guidance Limits_

Caps on the combined count of several guidance types, on top of each type’s own max\_count. A run must fit both: 9 images, 3 videos and 3 audio files can each be within their own limits and still exceed a 12-file total.

Array<object>

_ToolSharedGuidanceLimit_object

**types**

required

_Types_

Guidance file types that count toward this limit.

Array<string>

**max\_count**

required

_Max Count_

Most files of these types one run may attach combined. Only one first\_frame counts.

integer

**min\_combined\_duration\_seconds**

_Min Combined Duration Seconds_

Shortest summed length, in seconds, of the videos or audio of these types. Null when unbounded.

number

nullable

**max\_combined\_duration\_seconds**

_Max Combined Duration Seconds_

Longest summed length, in seconds, of the videos or audio of these types. Null when unbounded.

number

nullable

**init\_image\_views**

_Init Image Views_

3D models that read their init\_image files by view: the views a source can fill. Tag each init\_image with the view it shows (`view` on the guidance file); the model reads each file as the view it is tagged with, so a wrong tag warps the mesh. Empty when the model takes its views unordered.

Array<string>

**duration\_seconds**

_Duration Seconds_

Supported video durations in seconds

Array<integer>

**duration\_seconds\_min**

_Duration Seconds Min_

Audio models: shortest clip this model generates, in seconds.

number

nullable

**duration\_seconds\_max**

_Duration Seconds Max_

Audio models: longest clip this model generates, in seconds. Pass duration\_seconds between the min and max; a request outside them is refused.

number

nullable

**duration\_seconds\_required**

_Duration Seconds Required_

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

boolean

**quality\_levels**

_Quality Levels_

Quality rungs this model offers, lowest first, from minimal, low, medium, high, xhigh, max. Empty means the model has no quality control. Pass one of these as `quality`; a rung outside the list is clamped to the nearest one offered rather than refused. Higher rungs can cost more — price a run before spending on one.

Array<string>

**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

**music**

_Music_

Composes music. Distinguishes a music model from a sound-effect model, which the modality and the duration range alone do not.

boolean

**lyrics**

_Lyrics_

Takes sung words in a dedicated lyrics input, separate from the text prompt. This describes the input shape, not whether the model can sing: some families read lyrics written into the prompt instead, so a false value is not a reason to rule a model out for a song.

boolean

**auto\_duration**

_Auto Duration_

The model sets the output length itself, from the text or the input file. It has no duration control, so duration\_seconds is ignored: do not promise a requested length.

boolean

**instrumental**

_Instrumental_

Takes a flag that guarantees no vocals. On other music models, asking for an instrumental in the prompt is only a suggestion.

boolean

**loop**

_Loop_

Composes the clip to repeat with no audible seam when the `loop` parameter is set.

boolean

**composition\_plan**

_Composition Plan_

Takes the track as an ordered list of sections, each with its own length, styles and sung lines, via the `composition_plan` parameter. A plan supersedes `prompt`, `duration_seconds` and `instrumental`, which are dropped rather than sent with it.

boolean

**audio\_inpaint**

_Audio Inpaint_

boolean

**audio\_outpaint**

_Audio Outpaint_

boolean

**audio\_segments**

_Audio Segments_

Scores a video stretch by stretch from a contiguous list of per-stretch briefs.

boolean

**output\_formats**

_Output Formats_

Containers this model can be asked to deliver. Layer never re-encodes a clip, so an empty list means the model returns what it returns and the format cannot be promised.

Array<string>

**dub\_languages**

_Dub Languages_

ISO 639-1 codes a `dub_video` model can speak, passed to forge as `target_language`.

Array<string>

**voice\_reference\_set\_required**

_Voice Reference Set Required_

Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice.

boolean

**rigging**

_Rigging_

boolean

**animation**

_Animation_

boolean

**camera\_transform**

_Camera Transform_

boolean

**draft**

_Draft_

Renders a quick, low-cost draft when `draft` is set, to be completed at full quality later by its completion model (see the forge instructions).

boolean

**camera\_trajectory**

_Camera Trajectory_

boolean

**voice\_changer**

_Voice Changer_

boolean

**audio\_isolation**

_Audio Isolation_

boolean

**audio\_denoise**

_Audio Denoise_

boolean

**audio\_separation**

_Audio Separation_

boolean

**subtitle\_presets**

_Subtitle Presets_

Caption styles this subtitle model takes as `subtitle_preset`.

Array<string>

**subtitle\_dynamic\_presets**

_Subtitle Dynamic Presets_

The `subtitle_presets` that animate word by word; they bill at a higher rate than the rest.

Array<string>

**subtitle\_primary\_color**

_Subtitle Primary Color_

Takes the caption text colour as `subtitle_color`.

boolean

**subtitle\_secondary\_color**

_Subtitle Secondary Color_

Takes the colour of the words it emphasises as `subtitle_secondary_color`.

boolean

**subtitle\_alignment**

_Subtitle Alignment_

Takes the captions’ vertical position as `subtitle_alignment`.

boolean

**subtitle\_text\_srt**

_Subtitle Text Srt_

Reads `prompt` as SRT cues to burn in verbatim and refuses any other text there; an empty prompt transcribes the video’s own audio.

boolean

**output\_aspect\_ratios**

_Output Aspect Ratios_

Array<string>

**output\_size\_envelope**

_Output Size Envelope_

string

nullable

##### Example

```json
{
  "aliases": [],
  "modality": "text",
  "capabilities": {
    "text_prompt": false,
    "text_prompt_required": false,
    "negative_prompt": false,
    "seed": false,
    "inpainting": false,
    "outpainting": false,
    "tileability": false,
    "native_tileability": false,
    "tile_grid": false,
    "guidance_file_types": [
      {
        "min_count": 0
      }
    ],
    "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,
    "music": false,
    "lyrics": false,
    "auto_duration": false,
    "instrumental": false,
    "loop": false,
    "composition_plan": false,
    "audio_inpaint": false,
    "audio_outpaint": false,
    "audio_segments": false,
    "voice_reference_set_required": false,
    "rigging": false,
    "animation": false,
    "camera_transform": false,
    "draft": false,
    "camera_trajectory": false,
    "voice_changer": false,
    "audio_isolation": false,
    "audio_denoise": false,
    "audio_separation": false,
    "subtitle_primary_color": false,
    "subtitle_secondary_color": false,
    "subtitle_alignment": false,
    "subtitle_text_srt": false
  }
}
```

### 401

Unauthenticated — missing or invalid Bearer token.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 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

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 404

Resource not found.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 409

The outcome of the request with this `Idempotency-Key` is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in `Retry-After`.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 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

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 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

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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

### 500

Internal server error.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

##### Example

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