# Depending on other APIs

> Import API Definitions to generate unified SDKs

Fern allows you to import other APIs into your API.

This is often useful if:

* you want to reuse another API's types in your API
* you want to combine multiple microservices' APIs into one SDK (similar to the AWS SDK)

## Registering the dependency API

The first step is to **register** the API you want to depend on. To do this, use
the `register` command:

```
$ fern register
[some-dependency]: Uploading definition...
[some-dependency]: Registered @fern/some-dependency:0.0.1
```

## Depending on the registered API

To add a dependency on another API, you must add a `dependencies.yml` to declare which
APIs you wish to depend on.

<Files>
  <Folder name="fern" defaultOpen>
    <File name="fern.config.json" />

    <File name="generators.yml" />

    <File name="dependencies.yml" highlighted />

    <Folder name="definition" defaultOpen>
      <File name="api.yml" />

      <File name="imdb.yml" />
    </Folder>
  </Folder>
</Files>

Your `dependencies.yml`has a list of all the APIs you wish to depend:

```yaml dependencies.yml 
dependencies:
   "@fern/some-dependency": "0.0.1"
```

Next, you need create a folder in your Fern Definition to house the dependency. Inside the folder, create a special file
`__package__.yml` which specifies the dependency and version you want to add.

<Files>
  <Folder name="fern" defaultOpen>
    <File name="fern.config.json" />

    <File name="generators.yml" />

    <File name="dependencies.yml" />

    <Folder name="definition" defaultOpen>
      <File name="api.yml" />

      <File name="imdb.yml" />

      <Folder name="my-folder" defaultOpen highlighted>
        <File name="__package__.yml" highlighted />
      </Folder>
    </Folder>
  </Folder>
</Files>

```yaml __package__.yml
export:
  dependency: "@fern/some-dependency"
```

When you generate the SDK with `fern generate`, the `__package__.yml` file will
effectively be replaced with the API you're depending on.