Discover Models and Inspect Costs

Discover available models across protocols, run moderations, and lookup task execution costs.

Overview

AnyInt provides unified model discovery endpoints for OpenAI, Anthropic, and Gemini SDKs, along with OpenAI-compatible moderation and task cost lookup.

Model Discovery

GET /openai/v1/models GET /v1/models

json
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1715367049,
      "owned_by": "openai"
    }
  ]
}
  • List models: GET /openai/v1/models and GET /v1/models return a standard OpenAI model list filtered by API key permissions.
  • Response shape: Returns an enclosing { "object": "list", "data": [ ... ] }. Each item in data contains id, object: "model", created, and owned_by reflecting upstream provider data or platform defaults.
  • Tariffs and balances: Model pricing, token tariffs, and wallet balances are queried through dedicated billing endpoints or task cost lookups rather than the model list payload.

Content Moderation

POST/openai/v1/moderations
  • Endpoint contract: POST /openai/v1/moderations (operationId: openai.moderations) accepts required input (string or array of strings/objects up to 1,024 items) and an optional model.
  • Response schema: Returns id, model, and a results array where each item contains flagged (boolean), categories (boolean flags per category), and category_scores (numeric confidence scores).
  • Compatibility route: Accepts POST /v1/moderations (operationId: openai.moderations.alias) as a canonical compatibility alias.

Task Cost Lookup

POST/v1/tasks/request-costs
  • Endpoint contract: Published in Developer OpenAPI at POST /v1/tasks/request-costs (operationId: chatroom.request_costs).
  • Batch lookup: Pass an array of request_ids (1 to 100 IDs, string 8–160 characters) to retrieve settled charges for completed tasks.
  • Response structure: Returns { "request_costs": [{ "request_id": "...", "credits": 1.25 }] }.
  • Credit billing: Costs are reported in platform credits (100 credits equal 1 USD) with four-decimal precision.

Protocol Endpoints

  • OpenAI protocol: GET /openai/v1/models and compatibility path GET /v1/models.
  • Anthropic protocol: GET /anthropic/v1/models for Claude Code and SDK clients.
  • Gemini protocol: GET /gemini/v1beta/models for Google GenAI SDK clients.