> This is the Markdown version of the page. For the complete Lattice Developers documentation index, fetch https://developer.anduril.com/llms.txt. Append .md to any page URL for its clean Markdown.

# Create egress stream

POST https://example.developer.anduril.com/api/v1/video/egress_streams
Content-Type: application/json

Creates an egress stream that publishes a live stream to a downstream consumer.
 A stream in `STREAM_STATUS_UNAVAILABLE` is rejected as not-live.

Reference: https://developer.anduril.com/reference/rest/video/create-egress-stream

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a CreateEgressStreamRequest.

- `ingressId` (string, optional) — Identifier of the live ingress stream to re-publish as an egress stream.
- `rtsp` (RtspSettings, optional) — Settings for RTSP.
- `srt` (SrtSettings, optional) — The Lattice video service supports SRT protocol for push operations (ingress) and pull operations (egress). When configuring SRT for ingress, CreateIngressStreamResponse will return to the user a url to push to which contains a unique `sessionId` to use on the connection. If supplied, passphrase will be applied on incoming connections. When configuring SRT for egress, CreateEgressStreamResponse will return to the user a url from which to pull a stream. Use the supplied sessionId and passphrase in your StreamId if applicable. See the SRT documentation on Access Control for more information.

## Response

### 200

OK

- `egressId` (string, optional) — Service-generated identifier for the new egress stream. Use it for subsequent `GetEgressStream` and `DeleteEgressStream` calls.
- `rtsp` (RtspEgress, optional) — RTSP egress connection details.
- `srt` (SrtEgress, optional) — SRT egress connection details.

## Errors

### 400 Bad Request Error

The request was malformed or violated a precondition. Possible causes include missing required fields, an unsupported value, an `oneof` with zero or more than one variant set, a malformed URL, or a state-based precondition such as the source ingress stream not being live.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 401 Unauthorized Error

The request was rejected because the bearer token was missing, malformed, or could not be resolved to a user identity.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 403 Forbidden Error

The caller is authenticated but lacks permission for the requested resource.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 404 Not Found Error

The specified ingress or egress stream was not found.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 409 Conflict Error

The supplied identifier is already in use. For ingress creation this means the requested `ingressId` is taken by another stream; for egress creation an egress stream already exists for the requested source.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 429 Too Many Requests Error

A service-wide resource pool is exhausted. For egress this means a port could not be allocated or the egress instance is at capacity. There is no per-caller quota or rate limit, so this reflects deployment-wide capacity rather than caller behavior.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 503 Service Unavailable Error

The service is temporarily unable to handle the request, such as during startup or when a backend dependency is shutting down. The response carries a RetryInfo hint (typically around 2 seconds); clients should retry per that hint.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

## Types

### RtspSettings

Settings for RTSP.

- `url` (string, optional) — The upstream RTSP URL the service should pull frames from. Must use the `rtsp://` scheme.

### SrtSettings

The Lattice video service supports SRT protocol for push operations (ingress) and pull operations (egress). When configuring SRT for ingress, CreateIngressStreamResponse will return to the user a url to push to which contains a unique `sessionId` to use on the connection. If supplied, passphrase will be applied on incoming connections. When configuring SRT for egress, CreateEgressStreamResponse will return to the user a url from which to pull a stream. Use the supplied sessionId and passphrase in your StreamId if applicable. See the SRT documentation on Access Control for more information.

- `passphrase` (string, optional) — Optional passphrase for the stream, set by the user, that applies AES encryption.

### RtspEgress

RTSP egress connection details.

- `url` (string, optional) — The RTSP URL the downstream consumer should pull from.

### SrtEgress

SRT egress connection details.

- `url` (string, optional) — The URL on which Lattice listens. The downstream consumer pulls from this URL.
- `sessionId` (string, optional) — Unique session identifier the consumer must supply on the SRT connection.

### google.protobuf.Any

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

- `@type` (string, optional) — The type of the serialized message.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "egressId": "string",
  "rtsp": {
    "url": "string"
  },
  "srt": {
    "url": "string",
    "sessionId": "string"
  }
}
```