Skip to main content

Marketplace

The Marketplace publishes and deploys reusable apps and agents. Use this resource to browse items, deploy them into your environment and, as a platform admin, manage organizations' offering subscriptions.

Access it as client.marketplace on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.

Methods​

Lifecycle & actions​

deploy​

deploy(*, app_name: str, marketplace_item_id: str, terms_accepted: bool, resources: Mapping[str, Any] | None = None, volumes: Sequence[Mapping[str, Any]] | None = None, deployment_id: str | None = None, config: Mapping[str, Any] | None = None) -> MarketplaceDeployment

Deploy a marketplace offering.

The request is checked (terms, sizes, and the GPU type, volume sizes and settings picks against the offering's deploy config) before it is answered, and a refused one raises a ValidationError (400) naming what is wrong and creates nothing (no deployment record, no workload); otherwise the deployment starts and runs in the background: follow it with deployment_status. The app runs at resources when given, otherwise at the size the offering declares (resources.defaults in item_deploy_config); each new add-on at the cpu, memory and disk of its config["addons"][i]["createNew"], otherwise at the offering's addons[].defaults.

A size is the whole workload: Strongly's helper services beside it (sign-in proxy, outbound proxy, data volume mounts, model cache upload, metrics) are taken out of it, never added on top (set 4 GB and the workload uses 4 GB in total). A size too small to hold them is refused naming them. A CPU, memory, GPU count or disk above the largest allowed machine's room for one workload raises APIError with status_code 400 naming the resource and both figures, and nothing is created or changed. Check client.compute.list_pools() allowed_sizes (max_cpu, max_memory_gib, max_disk_gib, max_gpus) before a large size.

Parameters

  • app_name (str): The offering's app_name (see retrieve_item).
  • marketplace_item_id (str): The marketplace item's id.
  • terms_accepted (bool): True accepts the marketplace terms (required to deploy).
  • resources (Mapping[str, Any] | None, optional): The app's size and capacity: {"cpu": "1", "memory": "2GB", "disk": "10GB", "instances": 1, "useSpot": True, "spotFallback": True}` (`cpu` a string; `useSpot runs the app on spot capacity, spotFallback True, the default, falls back to on-demand when spot is unavailable). gpuType runs it on one GPU of that type: one of the offering's resources.options.gpu (see item_deploy_config) that the platform offers; left out or "", the app runs without a GPU. A type the offering does not list, or one the platform cannot run, is refused. An app offering that defines its environment (the item's environment) runs on YOUR environment for its key, as if you deployed it yourself: yours (else one shared with you) is used; none is created as yours in your organization (its image builds there); one at an older catalog version that you may change gets a new version (apps on earlier versions keep their image). The app is pinned to its current version and runs at its size: give only instances, useSpot and spotFallback (cpu, memory, disk or gpuType is refused).
  • volumes (Sequence[Mapping[str, Any]] | None, optional): The size of each volume the offering declares (its deploy config's volumes): [{"id": "data", "size": "50GB"}]. id is one of the offering's volumes[].id and size one of its options.size; a volume left out gets its defaults.size. Every declared volume is created (a shared volume you own, kept when the app is deleted) and mounted in the app, its data directory (/volumes/shared/<volume name>/data) in the volume's envVar.
  • deployment_id (str | None, optional): An id you choose for the deployment (17 letters and digits). The same id from you for the same item returns the same deployment, so a retried request deploys once. The API's default is a new id.
  • config (Mapping[str, Any] | None, optional): The deploy form's other choices, with their wire names: addons, permissions, environmentVariables, aiModels, createProject and so on. environmentVariables also carries the offering's deploy-config settings picks, one per setting's envVar: one of its options[].value (left out: its default; a value not listed, or a required one missing, is refused). An offering whose deploy config declares ai_models takes aiModelsByPurpose: the models picked for each purpose, one model id, or a list of ids for a purpose declared multiple (every id also in aiModels); each model reaches the app's STRONGLY_SERVICES with the purposes it was picked for (available_models[].purposes). A streaming workflow offering also takes sessionInitiatorRoles: the platform roles ("admin", "developer") allowed to start its sessions, starting from its deploy config's permissions.session_initiator_roles; a user without one of them is refused a session.

Returns

  • MarketplaceDeployment: The deployment as it starts (202); follow its id.

Raises

  • UnprocessableEntityError: The terms were not accepted.
  • ValidationError: A choice is invalid, or a size cannot run.
  • PermissionDeniedError: The offering is not enabled for users.
  • Each workload the offering creates is governed like one you create
  • yourself; a governance block holds the deployment (``governance-hold``)
  • until its requirements are complete, then it continues.
  • NotFoundError: There is no such item.

Other​

available_addons​

available_addons(*, type: str | None = None, search: str | None = None, limit: int | None = None) -> SyncPaginator[AvailableAddon]

List the running add-ons and object-store data sources a deployment can use.

Yours and those shared with you, by type then label.

Parameters

  • type (str | None, optional): Only those of this type (postgres, redis, s3, ...).
  • search (str | None, optional): Only those whose label contains this text.
  • limit (int | None, optional): The most to return; all of them when omitted.

available_models​

available_models(*, model_type: str | None = None, search: str | None = None, limit: int | None = None) -> SyncPaginator[AvailableModel]

List the AI models a deployment can use, each with its provider.

Parameters

  • model_type (str | None, optional): Only models of this type, or of any of several, comma-separated (chat,multimodal); every deployable model when omitted.
  • search (str | None, optional): Only models whose name, provider or vendor model id contains this text.
  • limit (int | None, optional): The most to return; all of them when omitted.

cancel_deployment​

cancel_deployment(deployment_id: str) -> MarketplaceDeployment

Cancel a deployment in progress; what it created is removed.

The deployment moves to cancelling, then cancelled; follow it with deployment_status.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • MarketplaceDeployment: The deployment, cancelling, as retrieve_deployment shows it.

Raises

  • NotFoundError: There is no such deployment.

cancel_subscription​

cancel_subscription(subscription_id: str, *, at_period_end: bool) -> OfferingSubscription

Cancel an offering subscription. Admin only.

Parameters

  • subscription_id (str): The subscription's id.
  • at_period_end (bool): True: Stripe ends it when its billing period ends (cancel_at_period_end shows it; refused while its checkout is pending). False: canceled now, and the organization's apps pause; data is kept.

Raises

  • ConflictError: It is already canceled, or it has no billing period yet.
  • NotFoundError: There is no such subscription.

create_item​

create_item(*, name: str, app_name: str, description: str, vendor: str, type: str, vertical: str, featured: bool | None = None, tags: Sequence[str] | None = None, images: Mapping[str, Any] | None = None, features: Sequence[str] | None = None, requirements: Mapping[str, Any] | None = None, specifications: Mapping[str, Any] | None = None, pricing: Mapping[str, Any] | None = None, price: str | None = None, version: str | None = None, status: str | None = None, environment: Mapping[str, Any] | None = None) -> MarketplaceItem

Add an item to the marketplace catalog (platform admins); answers the item.

Parameters

  • name (str): The item's name.
  • app_name (str): The offering's name in the catalog: its code and deploy.json are published under it, and a deploy reads them by it.
  • description (str): What it is.
  • vendor (str): Who publishes it.
  • type (str): Its type: "app", "agent", "batch_workflow", "streaming_workflow", "project" or "plugin".
  • vertical (str): Its vertical, such as "technology".
  • featured (bool | None, optional): Whether it shows among the featured items.
  • tags (Sequence[str] | None, optional): Its search tags.
  • images (Mapping[str, Any] | None, optional): Its images: main (its card and page image URL), thumbnail (the image a deployed app takes) and gallery (URLs shown on its page).
  • features (Sequence[str] | None, optional): What it does, one line each.
  • requirements (Mapping[str, Any] | None, optional): What it needs to run.
  • specifications (Mapping[str, Any] | None, optional): Its technical specifications.
  • pricing (Mapping[str, Any] | None, optional): How it is priced.
  • price (str | None, optional): Its price as shown.
  • version (str | None, optional): Its version.
  • status (str | None, optional): Its listing status.
  • environment (Mapping[str, Any] | None, optional): An app offering's own environment: &#123;"key", "name", "description", "version", "baseImage" | "dockerfile", "vcpu", "memoryGb", "storageGb", "gpuCount", "gpuType"&#125; (exactly one of a pinned baseImage or a dockerfile with its FROM). A deploy runs the app on the deployer's own environment for key, creating it or adding a new version when version is newer.

Raises

  • PermissionDeniedError: You are not a platform admin.
  • ValidationError: A required field is missing, or the type or vertical is not one the marketplace shows.

create_subscription​

create_subscription(*, organization_id: str, offering_id: str, plan_name: str, activate_immediately: bool, success_url: str, cancel_url: str) -> OfferingSubscription

Subscribe an organization to a marketplace offering on a plan of its billing config.

Creates the Stripe customer and checkout; send the answer's checkout_url to the organization's billing contact. Admin only.

Parameters

  • organization_id (str): The organization (billing mode offering, with a billing email).
  • offering_id (str): The offering's app_name.
  • plan_name (str): A plan of the offering's billing config.
  • activate_immediately (bool): True: its apps are usable now while the first payment completes (the grace period runs from now); False: once Stripe reports it paid.
  • success_url (str): Where the checkout sends the billing contact after paying.
  • cancel_url (str): Where the checkout sends the billing contact when they leave it.

Returns

  • OfferingSubscription: The subscription, with its checkout_url.

Raises

  • ConflictError: Billing is off, the organization is not an offering customer or has no billing email, or it already has a subscription to the offering that is not canceled.
  • ValidationError: The offering's billing config has no such plan.
  • APIError: Stripe refused a request (502, with Stripe's reason).
  • PermissionDeniedError: You are not a platform admin.

delete_deployment​

delete_deployment(deployment_id: str) -> None

Remove the record of a finished deployment; what it created is kept.

Parameters

  • deployment_id (str): The deployment's id; one that is complete, failed or cancelled.

Raises

  • NotFoundError: There is no such deployment.
  • ConflictError: The deployment is still running; cancel it first.

delete_item​

delete_item(item_id: str) -> None

Remove an item from the marketplace catalog (platform admins).

Parameters

  • item_id (str): The item's id.

Raises

  • PermissionDeniedError: You are not a platform admin.

deployment_status​

deployment_status(deployment_id: str) -> DeploymentStatus

Return a marketplace deployment's status and progress.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • DeploymentStatus: The status and progress.

Raises

  • NotFoundError: There is no such deployment, or you cannot see it.

item_deploy_config​

item_deploy_config(item_id: str) -> dict[str, Any]

Return an offering's deploy configuration: what a deployment asks for.

Parameters

  • item_id (str): The item's id.

Returns

  • dict[str, Any]: The offering's own deploy description (free-form): its steps, resources (defaults and options), addons, permissions and so on; an app offering that defines its environment gives it in environment (the same block as MarketplaceItem.environment; its size is then the environment's).

Raises

  • NotFoundError: There is no such item, or it has no deploy configuration.

item_license​

item_license(item_id: str) -> MarketplaceLicense

Return an offering's license text.

Parameters

  • item_id (str): The item's id.

Returns

  • MarketplaceLicense: The license, or found=False when the offering has none.

item_stats​

item_stats(*, search: str | None = None, vertical: str | None = None, type: str | None = None, featured: bool | None = None) -> MarketplaceItemStats

Count the marketplace's offerings list_items lists, with the same filters.

Every item is counted (not a page): in all, by type and by vertical, and how many are featured.

Parameters

  • search, vertical, type, featured (optional): As list_items takes them (type may name several, comma-separated).

Returns

  • MarketplaceItemStats: total, by_type, by_vertical (most first) and featured.

list_deployments​

list_deployments(*, marketplace_item_id: str | None = None, limit: int | None = None) -> SyncPaginator[MarketplaceDeployment]

List your marketplace deployments (those you own or started), newest first.

Each is as retrieve_deployment shows it: status, progress, result, error and what it created.

Parameters

  • marketplace_item_id (str | None, optional): Only the deployments of this marketplace item (its latest is the first).
  • limit (int | None, optional): The most to return; all of them when omitted.

list_items​

list_items(*, search: str | None = None, vertical: str | None = None, type: str | None = None, featured: bool | None = None, sort: str | None = None, limit: int | None = None) -> SyncPaginator[MarketplaceItemSummary]

List the marketplace's offerings.

On a production install only the published ones, as the Marketplace page shows them.

Parameters

  • search (str | None, optional): Only items whose name, description, tags or vendor contain this text (case insensitive).
  • vertical (str | None, optional): Only items in this vertical, such as "technology".
  • type (str | None, optional): Only items of this type: "app", "agent", "plugin", "project", "streaming_workflow" or "batch_workflow".
  • featured (bool | None, optional): True lists only featured items (False filters nothing).
  • sort (str | None, optional): The order, as comma-separated wire field names, each prefixed with - for descending (for example "name"). The API's default is "-createdAt".
  • limit (int | None, optional): The most items to return; None returns every one.

Returns

  • SyncPaginator[MarketplaceItemSummary]: The items, fetched a page at a time.

list_subscriptions​

list_subscriptions(*, organization_id: str | None = None, offering_id: str | None = None, status: str | None = None, limit: int | None = None) -> SyncPaginator[OfferingSubscription]

List offering subscriptions, newest first. Admin only.

Parameters

  • organization_id (str | None, optional): Only this organization's subscriptions.
  • offering_id (str | None, optional): Only subscriptions to this offering (its app_name).
  • status (str | None, optional): Only subscriptions with this status: "active", "grace", "suspended" or "canceled".
  • limit (int | None, optional): The most to return; all of them when omitted.

Raises

  • PermissionDeniedError: You are not a platform admin.

list_verticals​

list_verticals() -> list[MarketplaceVertical]

List the marketplace's verticals, most items first.

Returns

  • list[MarketplaceVertical]: Each vertical with its item count.

record_offering_usage​

record_offering_usage(*, offering_id: str, meter_key: str, quantity: float, idempotency_key: str, occurred_at: str | None = None) -> OfferingUsageRecorded

Record usage of a metered offering your organization subscribes to.

Only the offering's own deployed app records its usage: call this from inside that app, where Strongly() reaches the platform through the app's auth-proxy, which signs the call with the app's workload identity (no API key). An API key is refused (403) whatever its scopes, offering-usage:write included, and so is any other workload. The usage is metered to the calling app's organization.

Recording is exactly-once per idempotency_key.

Parameters

  • offering_id (str): The offering's app_name.
  • meter_key (str): A meter of your organization's subscription to the offering (such as "resumes").
  • quantity (float): A positive quantity (for a counter the amount used, for a gauge the current value).
  • idempotency_key (str): A key you choose, unique per event.
  • occurred_at (str | None, optional): When it happened, ISO 8601. The API's default is when it is received.

Returns

  • OfferingUsageRecorded: The event's id, or deduplicated=True when the key was already recorded.

Raises

  • UnprocessableEntityError: No live subscription to the offering, an unknown meter, a quantity that is not positive, or an invalid occurred_at.
  • PermissionDeniedError: The caller is not the offering's own deployed app (an API key, a session or another workload).

retrieve_deployment​

retrieve_deployment(deployment_id: str) -> MarketplaceDeployment

Retrieve a marketplace deployment: its progress, result and what it created.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • MarketplaceDeployment: The deployment.

Raises

  • NotFoundError: There is no such deployment, or you cannot see it.

retrieve_item​

retrieve_item(item_id: str) -> MarketplaceItem

Retrieve a marketplace item with all its detail.

Parameters

  • item_id (str): The item's id.

Returns

  • MarketplaceItem: The item.

Raises

  • NotFoundError: There is no such item, or it is a draft on a production install.

retrieve_subscription​

retrieve_subscription(subscription_id: str) -> OfferingSubscription

Retrieve an offering subscription. Admin only.

Parameters

  • subscription_id (str): The subscription's id.

Raises

  • NotFoundError: There is no such subscription.
  • PermissionDeniedError: You are not a platform admin.

update_item​

update_item(item_id: str, *, name: str | None = None, app_name: str | None = None, description: str | None = None, vendor: str | None = None, type: str | None = None, vertical: str | None = None, featured: bool | None = None, tags: Sequence[str] | None = None, images: Mapping[str, Any] | None = None, features: Sequence[str] | None = None, requirements: Mapping[str, Any] | None = None, specifications: Mapping[str, Any] | None = None, pricing: Mapping[str, Any] | None = None, price: str | None = None, version: str | None = None, status: str | None = None, environment: Mapping[str, Any] | None = None) -> MarketplaceItem

Change a marketplace item (platform admins): only the fields given; answers the item.

Parameters

  • item_id (str): The item's id.
  • name (str | None, optional): Its name.
  • app_name (str | None, optional): Its name in the catalog (its published code and deploy.json).
  • description (str | None, optional): What it is.
  • vendor (str | None, optional): Who publishes it.
  • type (str | None, optional): Its type.
  • vertical (str | None, optional): Its vertical.
  • featured (bool | None, optional): Whether it shows among the featured items.
  • tags (Sequence[str] | None, optional): Its search tags.
  • images (Mapping[str, Any] | None, optional): Its images: main (its card and page image URL), thumbnail (the image a deployed app takes) and gallery (URLs shown on its page).
  • features (Sequence[str] | None, optional): What it does, one line each.
  • requirements (Mapping[str, Any] | None, optional): What it needs to run.
  • specifications (Mapping[str, Any] | None, optional): Its technical specifications.
  • pricing (Mapping[str, Any] | None, optional): How it is priced.
  • price (str | None, optional): Its price as shown.
  • version (str | None, optional): Its version.
  • status (str | None, optional): Its listing status.
  • environment (Mapping[str, Any] | None, optional): An app offering's own environment: &#123;"key", "name", "description", "version", "baseImage" | "dockerfile", "vcpu", "memoryGb", "storageGb", "gpuCount", "gpuType"&#125; (exactly one of a pinned baseImage or a dockerfile with its FROM). A deploy runs the app on the deployer's own environment for key, creating it or adding a new version when version is newer.

Raises

  • PermissionDeniedError: You are not a platform admin.
  • NotFoundError: There is no such item.

update_subscription​

update_subscription(subscription_id: str, *, plan_name: str) -> OfferingSubscription

Move an offering subscription to another plan of its offering's billing config.

A started subscription's Stripe items become the new plan's (usage of a meter the new plan drops is reported first). A plan that costs more is charged for the rest of the period; one that costs less is billed from the next renewal, nothing credited back (no refunds). A subscription whose checkout is pending gets a new checkout_url. Admin only.

Parameters

  • subscription_id (str): The subscription's id.
  • plan_name (str): The new plan.

Raises

  • ConflictError: It is canceled, or usage of a dropped meter is still being reported.
  • ValidationError: It is already on that plan, or there is no such plan.
  • NotFoundError: There is no such subscription.