osmAPI · Schema

osmAPI Chat Completion Response

Schema for an osmAPI chat completion response object

Artificial IntelligenceAnthropicGatewayLLMOpenAIRouting

Properties

Name Type Description
id string Unique identifier for the completion
object string Object type identifier
created integer Unix timestamp of creation
model string Model used for the completion
choices array
usage object
metadata object
View JSON Schema on GitHub

JSON Schema

osmapi-chat-completion-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/osmapi/refs/heads/main/json-schema/osmapi-chat-completion-schema.json",
  "title": "osmAPI Chat Completion Response",
  "description": "Schema for an osmAPI chat completion response object",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the completion"
    },
    "object": {
      "type": "string",
      "description": "Object type identifier"
    },
    "created": {
      "type": "integer",
      "description": "Unix timestamp of creation"
    },
    "model": {
      "type": "string",
      "description": "Model used for the completion"
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              },
              "reasoning": {
                "type": "string"
              },
              "tool_calls": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "images": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "finish_reason": {
            "type": "string"
          }
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "prompt_tokens": {
          "type": "integer"
        },
        "completion_tokens": {
          "type": "integer"
        },
        "total_tokens": {
          "type": "integer"
        },
        "reasoning_tokens": {
          "type": "integer"
        },
        "cost_usd_total": {
          "type": "number"
        },
        "cost_usd_input": {
          "type": "number"
        },
        "cost_usd_output": {
          "type": "number"
        }
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "requested_model": {
          "type": "string"
        },
        "used_model": {
          "type": "string"
        },
        "used_provider": {
          "type": "string"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/osmapi-chat-completion"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.