Athina AI Prompts API

Create, version, fetch, and run prompt templates.

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/athina-prompts-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 email required.

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

OpenAPI Specification

athina-prompts-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Athina AI Datasets Prompts API
  description: REST API for the Athina AI LLM monitoring, evaluation, and experimentation platform. Log inferences and prompt runs, build traces and spans, manage datasets, run evaluations, and create, version, and run prompt templates. All requests authenticate with an `athina-api-key` header. Inference and prompt-run logging is served from the `https://log.athina.ai` host; all other resources are served from `https://api.athina.ai/api/v1`.
  termsOfService: https://www.athina.ai/terms
  contact:
    name: Athina AI Support
    url: https://www.athina.ai
    email: hello@athina.ai
  version: '1.0'
servers:
- url: https://api.athina.ai/api/v1
  description: Core API (datasets, traces, prompts, evals)
- url: https://log.athina.ai/api/v1
  description: Inference logging host
security:
- athinaApiKey: []
tags:
- name: Prompts
  description: Create, version, fetch, and run prompt templates.
paths:
  /prompt/{prompt_slug}:
    put:
      operationId: createPromptTemplate
      tags:
      - Prompts
      summary: Create or version a prompt template
      description: Create a prompt template at the given slug, or create a new incremented version if the slug already exists. Supports template variables of the form {{variable_name}} within message content.
      parameters:
      - $ref: '#/components/parameters/PromptSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePromptRequest'
      responses:
        '200':
          description: Prompt template created or versioned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplate'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /prompt/{prompt_slug}/default:
    get:
      operationId: getDefaultPrompt
      tags:
      - Prompts
      summary: Get the default prompt version
      description: Fetch the default version of a prompt template by slug.
      parameters:
      - $ref: '#/components/parameters/PromptSlug'
      responses:
        '200':
          description: Prompt template retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /prompt/{prompt_slug}/run:
    post:
      operationId: runPrompt
      tags:
      - Prompts
      summary: Run a prompt
      description: Execute a managed prompt template by slug with input variables. Optional overrides for version, model, and model parameters. Results are recorded on the Athina Observe page.
      parameters:
      - $ref: '#/components/parameters/PromptSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunPromptRequest'
      responses:
        '200':
          description: Prompt executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunPromptResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreatePromptRequest:
      type: object
      required:
      - prompt
      - model
      properties:
        prompt:
          type: array
          items:
            $ref: '#/components/schemas/Message'
        model:
          type: string
          example: gpt-4o
        parameters:
          $ref: '#/components/schemas/ModelParameters'
        commit_message:
          type: string
    RunPromptResponse:
      type: object
      properties:
        prompt_run_id:
          type: string
        response:
          type: string
        model:
          type: string
        usage:
          type: object
          properties:
            prompt_tokens:
              type: number
            completion_tokens:
              type: number
            total_tokens:
              type: number
    Error:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
    RunPromptRequest:
      type: object
      required:
      - variables
      properties:
        variables:
          type: object
          additionalProperties: true
          description: Input values substituted into the prompt template.
        version:
          type: integer
          description: Optional prompt version; defaults to the default version.
        model:
          type: string
          description: Optional model override.
        parameters:
          $ref: '#/components/schemas/ModelParameters'
    ModelParameters:
      type: object
      properties:
        temperature:
          type: number
        max_tokens:
          type: integer
        top_p:
          type: number
        presence_penalty:
          type: number
        frequency_penalty:
          type: number
    PromptTemplate:
      type: object
      properties:
        slug:
          type: string
        version:
          type: integer
        prompt:
          type: array
          items:
            $ref: '#/components/schemas/Message'
        model:
          type: string
        parameters:
          $ref: '#/components/schemas/ModelParameters'
    Message:
      type: object
      properties:
        role:
          type: string
          example: user
        content:
          type: string
          example: What is the capital of France?
  parameters:
    PromptSlug:
      name: prompt_slug
      in: path
      required: true
      schema:
        type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid athina-api-key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    athinaApiKey:
      type: apiKey
      in: header
      name: athina-api-key
      description: Athina API key created in the Athina platform settings.