curl --request POST \
--url https://api.fireworks.ai/v1/accounts/{account_id}/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": {
"displayName": "<string>",
"baseImageRef": "<string>",
"shared": true,
"annotations": {}
},
"environmentId": "<string>"
}
'{
"name": "<string>",
"displayName": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"state": "STATE_UNSPECIFIED",
"status": {
"code": "OK",
"message": "<string>"
},
"connection": {
"nodePoolId": "<string>",
"numRanks": 123,
"role": "<string>",
"zone": "<string>",
"useLocalStorage": true
},
"baseImageRef": "<string>",
"imageRef": "<string>",
"snapshotImageRef": "<string>",
"shared": true,
"annotations": {},
"updateTime": "2023-11-07T05:31:56Z"
}curl --request POST \
--url https://api.fireworks.ai/v1/accounts/{account_id}/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": {
"displayName": "<string>",
"baseImageRef": "<string>",
"shared": true,
"annotations": {}
},
"environmentId": "<string>"
}
'{
"name": "<string>",
"displayName": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"state": "STATE_UNSPECIFIED",
"status": {
"code": "OK",
"message": "<string>"
},
"connection": {
"nodePoolId": "<string>",
"numRanks": 123,
"role": "<string>",
"zone": "<string>",
"useLocalStorage": true
},
"baseImageRef": "<string>",
"imageRef": "<string>",
"snapshotImageRef": "<string>",
"shared": true,
"annotations": {},
"updateTime": "2023-11-07T05:31:56Z"
}Bearer authentication using your Fireworks API key. Format: Bearer <API_KEY>
The Account Id
The properties of the Environment being created.
Show child attributes
The URI of the base container image used for this environment.
Whether the environment is shared with all users in the account. This allows all users to connect, disconnect, update, delete, clone, and create batch jobs using the environment.
Arbitrary, user-specified metadata. Keys and values must adhere to Kubernetes constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set Additionally, the "fireworks.ai/" prefix is reserved.
Show child attributes
A successful response.
The creation time of the environment.
The email address of the user who created this environment.
The current state of the environment.
STATE_UNSPECIFIED, CREATING, DISCONNECTED, CONNECTING, CONNECTED, DISCONNECTING, RECONNECTING, DELETING The current error status of the environment.
Show child attributes
The status code.
OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, DATA_LOSS A developer-facing error message in English.
Information about the current environment connection.
Show child attributes
The resource id of the node pool the environment is connected to.
For GPU node pools: one GPU per rank w/ host packing, for CPU node pools: one host per rank. If not specified, the default is 1.
The ARN of the AWS IAM role that the connection should assume. If not specified, the connection will fall back to the node pool's node_role.
Current for the last zone that this environment is connected to. We want to warn the users about cross zone migration latency when they are connecting to node pool in a different zone as their persistent volume.
If true, the node's local storage will be mounted on /tmp. This flag has no effect if the node does not have local storage.
The URI of the base container image used for this environment.
The URI of the container image used for this environment. This is a image is an immutable snapshot of the base_image_ref when the environment was created.
The URI of the latest container image snapshot for this environment.
Whether the environment is shared with all users in the account. This allows all users to connect, disconnect, update, delete, clone, and create batch jobs using the environment.
Arbitrary, user-specified metadata. Keys and values must adhere to Kubernetes constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set Additionally, the "fireworks.ai/" prefix is reserved.
Show child attributes
The update time for the environment.
Was this page helpful?