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

# Create a custom agent cost item

> Price a non-LLM cost item the registry has never heard of — a search API, a vector DB, GPU seconds, a render. The item is priced entirely by its `dimensions` (its token rates are 0). `provider` and `item` must match, verbatim, the `vendor` and `item` your SDK sends on `hyperline.cost({ vendor, item, quantity, unit })` — they are lowercased and trimmed, nothing else — and each `dimensions[].key` must match the `unit` of the call it prices: `cost()` writes the quantity to `usage_extra[unit]` and pricing matches a dimension by that exact key, so a key that does not match prices nothing. Idempotent by design so a seed script can be re-run: an open custom item already standing for that (provider, item) is returned as it is, rates untouched, with a 200 instead of a fresh 201 — edit a rate by deleting the item and creating it again. A (provider, item) pair the global registry already prices is refused: that model has a price, and a negotiated rate for it goes through the overrides endpoint.



## OpenAPI

````yaml post /v1/agents/cost-catalog/items
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/agents/cost-catalog/items:
    post:
      tags:
        - Agents
      summary: Create a custom agent cost item
      description: >-
        Price a non-LLM cost item the registry has never heard of — a search
        API, a vector DB, GPU seconds, a render. The item is priced entirely by
        its `dimensions` (its token rates are 0). `provider` and `item` must
        match, verbatim, the `vendor` and `item` your SDK sends on
        `hyperline.cost({ vendor, item, quantity, unit })` — they are lowercased
        and trimmed, nothing else — and each `dimensions[].key` must match the
        `unit` of the call it prices: `cost()` writes the quantity to
        `usage_extra[unit]` and pricing matches a dimension by that exact key,
        so a key that does not match prices nothing. Idempotent by design so a
        seed script can be re-run: an open custom item already standing for that
        (provider, item) is returned as it is, rates untouched, with a 200
        instead of a fresh 201 — edit a rate by deleting the item and creating
        it again. A (provider, item) pair the global registry already prices is
        refused: that model has a price, and a negotiated rate for it goes
        through the overrides endpoint.
      operationId: createAgentCostCatalogItem
      requestBody:
        description: Create custom cost item payload
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  type: string
                  minLength: 1
                item:
                  type: string
                  minLength: 1
                dimensions:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        pattern: ^[a-z0-9_.]{1,64}$
                      rate:
                        type: string
                        pattern: ^\d+(\.\d+)?$
                      per:
                        type: string
                        enum:
                          - 1m
                          - 1k
                          - unit
                    required:
                      - key
                      - rate
                      - per
                  minItems: 1
                  maxItems: 10
              required:
                - provider
                - item
                - dimensions
      responses:
        '200':
          description: The custom cost item already existed
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    type: string
                  model:
                    type: string
                  aliases:
                    type: array
                    items:
                      type: string
                  input_per_m_tokens:
                    type: string
                  output_per_m_tokens:
                    type: string
                  cached_input_per_m_tokens:
                    type: string
                  cache_write_per_m_tokens:
                    type: string
                  dimensions:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        rate:
                          type: string
                        per:
                          type: string
                          enum:
                            - 1m
                            - 1k
                            - unit
                      required:
                        - key
                        - rate
                        - per
                  effective_from:
                    type: string
                  source:
                    type: string
                  custom_item_id:
                    type:
                      - string
                      - 'null'
                  override:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                      input_per_m_tokens:
                        type: string
                      output_per_m_tokens:
                        type: string
                      cached_input_per_m_tokens:
                        type:
                          - string
                          - 'null'
                      cache_write_per_m_tokens:
                        type:
                          - string
                          - 'null'
                      dimensions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            rate:
                              type: string
                            per:
                              type: string
                              enum:
                                - 1m
                                - 1k
                                - unit
                          required:
                            - key
                            - rate
                            - per
                      effective_from:
                        type: string
                    required:
                      - id
                      - input_per_m_tokens
                      - output_per_m_tokens
                      - cached_input_per_m_tokens
                      - cache_write_per_m_tokens
                      - effective_from
                required:
                  - provider
                  - model
                  - aliases
                  - input_per_m_tokens
                  - output_per_m_tokens
                  - cached_input_per_m_tokens
                  - cache_write_per_m_tokens
                  - dimensions
                  - effective_from
                  - source
                  - custom_item_id
                  - override
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    type: string
                  model:
                    type: string
                  aliases:
                    type: array
                    items:
                      type: string
                  input_per_m_tokens:
                    type: string
                  output_per_m_tokens:
                    type: string
                  cached_input_per_m_tokens:
                    type: string
                  cache_write_per_m_tokens:
                    type: string
                  dimensions:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        rate:
                          type: string
                        per:
                          type: string
                          enum:
                            - 1m
                            - 1k
                            - unit
                      required:
                        - key
                        - rate
                        - per
                  effective_from:
                    type: string
                  source:
                    type: string
                  custom_item_id:
                    type:
                      - string
                      - 'null'
                  override:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                      input_per_m_tokens:
                        type: string
                      output_per_m_tokens:
                        type: string
                      cached_input_per_m_tokens:
                        type:
                          - string
                          - 'null'
                      cache_write_per_m_tokens:
                        type:
                          - string
                          - 'null'
                      dimensions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            rate:
                              type: string
                            per:
                              type: string
                              enum:
                                - 1m
                                - 1k
                                - unit
                          required:
                            - key
                            - rate
                            - per
                      effective_from:
                        type: string
                    required:
                      - id
                      - input_per_m_tokens
                      - output_per_m_tokens
                      - cached_input_per_m_tokens
                      - cache_write_per_m_tokens
                      - effective_from
                required:
                  - provider
                  - model
                  - aliases
                  - input_per_m_tokens
                  - output_per_m_tokens
                  - cached_input_per_m_tokens
                  - cache_write_per_m_tokens
                  - dimensions
                  - effective_from
                  - source
                  - custom_item_id
                  - override
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````