Skip to main content
POST
/
v1
/
accounts
/
{account_id}
/
routers
Create Router
curl --request POST \
  --url https://api.fireworks.ai/v1/accounts/{account_id}/routers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "<string>",
  "deployments": [
    "<string>"
  ],
  "model": "<string>",
  "weightedRandom": {},
  "evenLoad": {},
  "public": true
}
'
{
  "name": "<string>",
  "displayName": "<string>",
  "createTime": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "state": "STATE_UNSPECIFIED",
  "status": {
    "code": "OK",
    "message": "<string>"
  },
  "deployments": [
    "<string>"
  ],
  "model": "<string>",
  "weightedRandom": {},
  "evenLoad": {},
  "aliases": [
    "<string>"
  ],
  "autoGenerated": true,
  "public": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.fireworks.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication using your Fireworks API key. Format: Bearer <API_KEY>

Path Parameters

account_id
string
required

The Account Id

Query Parameters

routerId
string

ID of the router.

Body

application/json
displayName
string
deployments
string[]

The deployment names to be covered by the router.

model
string

The model name to route requests to. model is only applicable to single-region deployments. For multi-region deployments, model must be empty.

weightedRandom
object

Use replica count as weight.

evenLoad
object

Dynamically adjust traffic allocation to balance the load per replica across the deployments as much as possible.

public
boolean

True if the router is public (any account can query the underlying workload), false if the router is private (only the account that owns the router can query the underlying workload).

Response

200 - application/json

A successful response.

name
string
read-only
displayName
string
createTime
string<date-time>
read-only
createdBy
string
read-only
state
enum<string>
default:STATE_UNSPECIFIED
read-only

The state of the router.

Available options:
STATE_UNSPECIFIED,
CREATING,
READY,
UPDATING,
DELETING
status
Mimics [https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto] · object
read-only
deployments
string[]

The deployment names to be covered by the router.

model
string

The model name to route requests to. model is only applicable to single-region deployments. For multi-region deployments, model must be empty.

weightedRandom
object

Use replica count as weight.

evenLoad
object

Dynamically adjust traffic allocation to balance the load per replica across the deployments as much as possible.

aliases
string[]
read-only
autoGenerated
boolean
read-only

auto_generated indicates this router was generated by the system for a deployment. Auto-generated routers cannot be updated or deleted by the user.

public
boolean

True if the router is public (any account can query the underlying workload), false if the router is private (only the account that owns the router can query the underlying workload).