# List pay-as-you-go offerings

- **OpenAPI Version:** `3.2.0`
- **API Version:** `3.1.0`
- **Contact:** Syndai <https://syndai.ai>

## Contents

**Operations**

- [GET /api/v1/public/offerings](#scalar-operation-get-apiv1publicofferings)

**Schemas**

- [OfferingsRead](#scalar-schema-offeringsread)
- [OfferingRead](#scalar-schema-offeringread)
- [OfferingLimitRead](#scalar-schema-offeringlimitread)
- [OfferingsPricingRead](#scalar-schema-offeringspricingread)
- [ProblemDetail](#scalar-schema-problemdetail)
- [ExternalErrorCode](#scalar-schema-externalerrorcode)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.syndai.ai`

<a id="scalar-context-global-authentication"></a>

## Authentication

- **CustomerApiKey**: HTTP bearer (`API Key`)

  Customer API key sent as a bearer token

## Tags

### Billing

The workspace's plan, balance and prices: read current-period usage, credit packs, plans, the live subscription and the credit runway with its top spenders, and create a payment link for a pack or a first plan. Nothing is charged until a person pays on that link; changing plan, the card and cancelling stay on the Billing page (403 `HUMAN_APPROVAL_REQUIRED`).

## Operations

<a id="scalar-operation-get-apiv1publicofferings"></a>

### List pay-as-you-go offerings

- **Method:** `GET`
- **Path:** `/api/v1/public/offerings`
- **Operation ID:** `listOfferings`
- **Tags:** Billing

Every job one API call can buy without a subscription: a coding run, a code review, a security review, an app walkthrough and the free checks. Each names the call that starts it, the `limit_usd` it takes (the most that job spends from credits) and `typical_usd`, the median cost of that job over the last 30 days (null with too few jobs to say). Paid jobs draw prepaid credits at provider cost times `usage_markup`. Out of credits, a start call answers 402 `INSUFFICIENT_CREDITS` with where to pay. No API key needed.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Responses

##### 200 Request fulfilled, document follows

**Headers:**

- **`cache-control`**

  `string`

**Content type:** `application/json`

[OfferingsRead](#scalar-schema-offeringsread)

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "offerings": [
    {
      "description": "",
      "key": "",
      "limit": {
        "default_usd": 1,
        "max_usd": 1,
        "min_usd": 1
      },
      "method": "",
      "name": "",
      "needs": [
        ""
      ],
      "path": "",
      "price": "",
      "typical_usd": 1
    }
  ],
  "pricing": {
    "checkout_url": "",
    "packs_url": "",
    "signup_credit_usd": 1,
    "signup_url": "",
    "usage_markup": 1,
    "usd_per_credit": 1
  }
}
```

##### 400, 401, 403, 404

- `400` Bad request syntax or unsupported method
- `401` Invalid or missing customer API key
- `403` Insufficient scope or forbidden customer access
- `404` Resource not found

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

<a id="scalar-example-2"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

##### 429 Rate limit exceeded

**Headers:**

- **`Retry-After`**

  Seconds to wait before retrying the request

  `integer`

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

[Generated example](#scalar-example-2)

##### default Unexpected error

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

<a id="scalar-example-3"></a>

**Generated example:**

```json
null
```

## Schemas

<a id="scalar-schema-offeringsread"></a>

### OfferingsRead

**Type:** `object`

- **`offerings` (required)**: array of [OfferingRead](#scalar-schema-offeringread)
- **`pricing` (required)**: [OfferingsPricingRead](#scalar-schema-offeringspricingread)

<a id="scalar-example-4"></a>

**Generated example:**

```json
{
  "offerings": [
    {
      "description": "",
      "key": "",
      "limit": {
        "default_usd": 1,
        "max_usd": 1,
        "min_usd": 1
      },
      "method": "",
      "name": "",
      "needs": [
        ""
      ],
      "path": "",
      "price": "",
      "typical_usd": 1
    }
  ],
  "pricing": {
    "checkout_url": "",
    "packs_url": "",
    "signup_credit_usd": 1,
    "signup_url": "",
    "usage_markup": 1,
    "usd_per_credit": 1
  }
}
```

<a id="scalar-schema-offeringread"></a>

### OfferingRead

**Type:** `object`

- **`description` (required)**: `string`
- **`key` (required)**: `string`
- **`method` (required)**: `string`
- **`name` (required)**: `string`
- **`needs` (required)**: `array of string`
- **`path` (required)**: `string`
- **`price` (required)**: `string`
- **`limit`**: [OfferingLimitRead](#scalar-schema-offeringlimitread) | `null`
- **`typical_usd`**: `number | null`

<a id="scalar-example-5"></a>

**Generated example:**

```json
{
  "description": "",
  "key": "",
  "limit": {
    "default_usd": 1,
    "max_usd": 1,
    "min_usd": 1
  },
  "method": "",
  "name": "",
  "needs": [
    ""
  ],
  "path": "",
  "price": "",
  "typical_usd": 1
}
```

<a id="scalar-schema-offeringlimitread"></a>

### OfferingLimitRead

**Type:** `object`

- **`default_usd` (required)**: `number`
- **`max_usd` (required)**: `number`
- **`min_usd` (required)**: `number`

<a id="scalar-example-6"></a>

**Generated example:**

```json
{
  "default_usd": 1,
  "max_usd": 1,
  "min_usd": 1
}
```

<a id="scalar-schema-offeringspricingread"></a>

### OfferingsPricingRead

**Type:** `object`

- **`checkout_url` (required)**: `string`
- **`packs_url` (required)**: `string`
- **`signup_credit_usd` (required)**: `number`
- **`signup_url` (required)**: `string`
- **`usage_markup` (required)**: `number`
- **`usd_per_credit` (required)**: `number`

<a id="scalar-example-7"></a>

**Generated example:**

```json
{
  "checkout_url": "",
  "packs_url": "",
  "signup_credit_usd": 1,
  "signup_url": "",
  "usage_markup": 1,
  "usd_per_credit": 1
}
```

<a id="scalar-schema-problemdetail"></a>

### ProblemDetail

**Type:** `object`

RFC 7807 problem detail returned for public CaaS errors.

- **`code` (required)**: `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "INTERNAL_ERROR"`

  Stable error codes surfaced to public CaaS clients.
- **`status` (required)**: `integer`
- **`title` (required)**: `string`
- **`detail`**: `string | null`, default: `null`
- **`existing_run_id`**: `string | null`, default: `null`
- **`instance`**: `string | null`, default: `null`
- **`type`**: `string`, default: `"about:blank"`

<a id="scalar-example-8"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

<a id="scalar-schema-externalerrorcode"></a>

### ExternalErrorCode

**Type:** `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
