DiscountedTokens API Messages API

The Messages API from DiscountedTokens API — 1 operation(s) for messages.

Operations 1

POST /messages Create an Anthropic-compatible message #

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-messages-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-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DiscountedTokens Messages 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: Messages
paths:
  /messages:
    post:
      operationId: createAnthropicMessage
      summary: Create an Anthropic-compatible message
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      requestBody:
        required: true
        description: Documented text-only request format. System text and user/assistant messages are forwarded, with text blocks flattened. Tool calls, images and streaming are not implemented by this adapter.
        content:
          application/json:
            schema:
              type: object
              required:
              - messages
              additionalProperties: false
              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
                  default: gpt-5.5
                messages:
                  type: array
                  items:
                    type: object
                    required:
                    - role
                    - content
                    additionalProperties: false
                    properties:
                      role:
                        type: string
                        enum:
                        - user
                        - assistant
                      content:
                        oneOf:
                        - type: string
                        - type: array
                          items:
                            type: object
                            required:
                            - text
                            additionalProperties: false
                            properties:
                              type:
                                type: string
                                description: Text-block label, such as text or input_text. Only the text field is forwarded.
                              text:
                                type: string
                system:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: object
                      required:
                      - text
                      additionalProperties: false
                      properties:
                        type:
                          type: string
                          description: Text-block label, such as text or input_text. Only the text field is forwarded.
                        text:
                          type: string
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 2000000
                  default: 4096
                  description: Proxy validation ceiling only; the upstream model may impose a lower output limit.
                temperature:
                  type: number
      responses:
        '200':
          description: Message
      tags:
      - Messages
components:
  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)