DiscountedTokens API Chat Completions API

The Chat Completions API from DiscountedTokens API — 1 operation(s) for chat completions.

Operations 1

POST /chat/completions Create an OpenAI-compatible chat completion #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/discountedtokens-api:discountedtokens-api-chat-completions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

discountedtokens-api-chat-completions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DiscountedTokens Chat API
  version: 1.0.0
  description: 'Low-cost prepaid model inference for autonomous agents and developers. Independent reseller with OpenAI-, Responses-, and Anthropic-format endpoints.


    Successful API requests are billed at the displayed token rates, metered to a fraction of a cent. Charges accumulate and are deducted from your prepaid balance in whole US cents, so a small request is not rounded up to a minimum charge.'
  x-discountedtokens-pricing:
    price_status: unavailable
    currency: USD
    unit: per_million_tokens
    pricing_url: https://discountedtokens.com/api/pricing
    catalog_url: https://discountedtokens.com/v1/models
    minimum_credit_purchase_usd: 5
    billing_model: prepaid_per_token
    free_trial: false
    authorization: Purchase credits only with operator authorization or an operator-approved budget.
    assumptions: Examples use the stated billed input/output counts, including any reported system or reasoning tokens. They are token-usage estimates, not a flat price per request or agent task. Extra usage, tools and payment/FX costs are not included.
    price_checked_at: null
    models: []
    example: null
  contact:
    email: support@discountedtokens.com
    url: https://discountedtokens.com/contact
  termsOfService: https://discountedtokens.com/terms
servers:
- url: https://discountedtokens.com/v1
tags:
- name: Chat Completions
paths:
  /chat/completions:
    post:
      operationId: createChatCompletion
      summary: Create an OpenAI-compatible chat completion
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - model
              - messages
              properties:
                model:
                  type: string
                  enum:
                  - gpt-5.6-sol
                  - gpt-5.6-terra
                  - gpt-5.5
                  - gpt-5.6
                  - gpt-6-astra
                  - codex-auto-review
                messages:
                  type: array
                  items:
                    type: object
                max_tokens:
                  type: integer
                  minimum: 1
                stream:
                  type: boolean
      responses:
        '200':
          description: Completion
          content:
            application/json:
              schema:
                type: object
                properties:
                  usage:
                    $ref: '#/components/schemas/Usage'
        '401':
          description: Invalid key
        '402':
          description: Insufficient credits
      tags:
      - Chat Completions
components:
  schemas:
    Usage:
      type: object
      description: Successful API requests are billed at the displayed token rates, metered to a fraction of a cent. Charges accumulate and are deducted from your prepaid balance in whole US cents, so a small request is not rounded up to a minimum charge.
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
        reseller_cost_usd:
          type: string
          description: Exact metered cost of this request in USD, six decimals.
        reseller_cost_micros:
          type: integer
          description: Exact metered cost in micro-USD (1e-6 USD), before whole-cent deduction.
        charged_cents:
          type: integer
          description: Whole US cents deducted from the prepaid balance for this request; the sub-cent remainder carries to later requests.
        sell_rate_in_usd:
          type: number
          description: Input rate applied, USD per million tokens.
        sell_rate_out_usd:
          type: number
          description: Output rate applied, USD per million tokens.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
externalDocs:
  description: Integration documentation
  url: https://discountedtokens.com/docs
x-provenance:
  method: harvested
  publisher: DiscountedTokens API
  source: https://discountedtokens.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)