> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.gomry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# One model call, priced per token, at three grades — with the routing, compression and caching that make the cheap grade cheap.

> One model call, priced per token, at three grades — with the routing, compression and caching that make the cheap grade cheap.

Requires the `inference:run` scope, and the project must have Ember enabled.

Billed on success. The response reports `usage` — the quantity metered for this call. Rates: https://docs.cloud.gomry.com/pricing.

Full reference: https://docs.cloud.gomry.com/services/inference



## OpenAPI

````yaml /openapi.json post /v1/inference
openapi: 3.1.0
info:
  title: Gomry Cloud API
  summary: >-
    Developer APIs from Gomry. Metered per request, priced per unit, billed
    monthly — no plans, no seats, no free tier to outgrow.
  description: >-
    Gomry Cloud sells the technical services Gomry built to run its own event
    platform as metered HTTP APIs.


    Authentication is an API key sent as a bearer token. Billing is postpaid and
    metered: you are charged per unit consumed, invoiced monthly, and only for
    work that produced a result. There is no free tier — an active payment
    method is required before any API will serve.


    Rate limits are applied per API key, not per IP. Guides, errors and rates:
    https://docs.cloud.gomry.com
  version: 1.0.0
  termsOfService: https://gomry.com/terms
  contact:
    name: Gomry Cloud support
    url: https://docs.cloud.gomry.com
servers:
  - url: https://api.cloud.gomry.com
    description: Production data plane
security:
  - bearerAuth: []
tags:
  - name: Scrape
    description: Fetch a page and extract structured data from it against a JSON schema.
    externalDocs:
      url: https://docs.cloud.gomry.com/services/scrape
  - name: ToolsAPI
    description: >-
      Find a tool that can do a task and run it — 1,700+ across 55+ vendors, on
      your Gomry key.
    externalDocs:
      url: https://docs.cloud.gomry.com/services/toolsapi
  - name: Superagent
    description: >-
      Give it a research question and a JSON schema. It plans, searches, reads,
      notices what is missing, searches again — and cites every field.
    externalDocs:
      url: https://docs.cloud.gomry.com/services/tasks
  - name: Ember
    description: >-
      One model call, priced per token, at three grades — with the routing,
      compression and caching that make the cheap grade cheap.
    externalDocs:
      url: https://docs.cloud.gomry.com/services/inference
externalDocs:
  description: Gomry Cloud documentation
  url: https://docs.cloud.gomry.com
paths:
  /v1/inference:
    post:
      tags:
        - Ember
      summary: >-
        One model call, priced per token, at three grades — with the routing,
        compression and caching that make the cheap grade cheap.
      description: >-
        One model call, priced per token, at three grades — with the routing,
        compression and caching that make the cheap grade cheap.


        Requires the `inference:run` scope, and the project must have Ember
        enabled.


        Billed on success. The response reports `usage` — the quantity metered
        for this call. Rates: https://docs.cloud.gomry.com/pricing.


        Full reference: https://docs.cloud.gomry.com/services/inference
      operationId: inference_post_v1_inference
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                capability:
                  description: >-
                    Required. cheap | balanced | strong. Chooses the
                    price/quality grade, never a specific model.
                system:
                  description: >-
                    Required. 1–20000 characters of instruction. Treat it as
                    yours: nothing is prepended.
                user:
                  description: >-
                    Required. 1–400000 characters. The content to work on. Long
                    inputs are trimmed to the model's window, head first.
                jsonSchema:
                  description: >-
                    A JSON Schema object. Sent as a constrained-decoding hint
                    where the vendor supports it; always parse defensively,
                    because some ignore it.
                maxOutputTokens:
                  description: >-
                    Caps the answer. 1–16384, and never raised above the
                    capability's own ceiling. Remember that thinking tokens
                    count against it, and check `usage.truncated` — a call that
                    hits the ceiling still returns 200.
                effort:
                  description: >-
                    minimal | low | default. Lowers the thinking budget on a
                    call that does not need to reason. Ignored by vendors that
                    do not support it.
                timeoutMs:
                  description: >-
                    Milliseconds before the vendor call is abandoned. Can only
                    tighten the capability's own timeout, never extend it.
                noCache:
                  description: >-
                    Skip the result cache for this call. Default false. A cache
                    hit bills the same as a live call — it is our cost that
                    changed, not your result.
            example:
              capability: cheap
              system: You extract structured data. Answer with one JSON object.
              user: Event page text here. Return the name and start date.
              jsonSchema:
                type: object
                properties:
                  name:
                    type: string
                  startDate:
                    type: string
      responses:
        '200':
          description: Success. `usage` reports what was metered.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: '`validation_error` — the body failed schema validation.'
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `unauthorized` — key missing, malformed, unknown, revoked or
            expired.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            `billing_required`, `billing_past_due`, `billing_suspended` or
            `insufficient_credit` — spending is blocked until a human adds a
            card, fixes one, or raises the project budget. Do not retry in a
            loop.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `forbidden` (the key lacks the scope) or `api_not_enabled` (the
            project has not enabled this API).
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `not_found` — the addressed resource does not exist, or is not yours
            to see.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited` — back off until `x-ratelimit-reset`, with jitter.'
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            `internal_error` — a fault on our side. Retry, and send us the
            `x-request-id`.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            `upstream_error` — a provider we depend on failed. Retryable, and
            not billed.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            `provider_unavailable` — the service is not currently configured to
            serve. Retryable.
          headers:
            x-request-id:
              schema:
                type: string
              description: >-
                Echoed or generated per request. Capture it — an intermittent
                failure cannot be traced without it.
            x-ratelimit-remaining:
              schema:
                type: integer
              description: Requests left in the current window for this key.
            x-ratelimit-reset:
              schema:
                type: integer
              description: Unix timestamp in milliseconds at which the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Stable machine-readable code. Branch on this, never on `message`.
        message:
          type: string
          description: Human-readable detail. Written for a person and may be reworded.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in the console, sent as `Authorization: Bearer <key>`.
        Keys are project-scoped and carry per-operation scopes. A `gck_test_…`
        key runs the full request path — including the real upstream call — and
        bills nothing.


        Every scope is enumerated in `x-scopes` below and in the RFC 9728
        protected-resource metadata at
        https://cloud.gomry.com/.well-known/oauth-protected-resource, which is
        also what a `401` points at through its `WWW-Authenticate: Bearer
        resource_metadata="…"` header.
      x-scopes:
        scrape:run: 'Grants: POST /v1/scrape.'
        scrape:fetch: 'Grants: POST /v1/fetch.'
        toolsapi:run: 'Grants: POST /v1/toolsapi/run.'
        toolsapi:read: >-
          Grants: POST /v1/toolsapi/discover, POST /v1/toolsapi/inspect, GET
          /v1/toolsapi/runs/{runId}.
        tasks:run: 'Grants: POST /v1/superagent.'
        tasks:read: 'Grants: GET /v1/superagent/{taskId}, DELETE /v1/superagent/{taskId}.'
        inference:run: 'Grants: POST /v1/inference.'
      x-protected-resource-metadata: https://cloud.gomry.com/.well-known/oauth-protected-resource
      x-credential-issuance-endpoint: https://cloud.gomry.com/sign-in
      x-agent-instructions: https://cloud.gomry.com/auth.md

````