Literal AI GraphQL API

The GraphQL API from Literal AI — 1 operation(s) for graphql.

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/literalai-graphql-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

literalai-graphql-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Literal AI GraphQL API
  description: 'HTTP transport model for the Literal AI observability, evaluation, and analytics platform. The Literal AI API is GraphQL: a single POST endpoint at /api/graphql accepts a GraphQL query/mutation document and variables. This OpenAPI document models that single endpoint so the GraphQL surface is discoverable in REST tooling; the full type system lives in graphql/literalai-schema.graphql. Authentication uses the x-api-key header.'
  termsOfService: https://www.literalai.com/terms
  contact:
    name: Literal AI Support
    url: https://docs.literalai.com
  version: '1.0'
servers:
- url: https://cloud.getliteral.ai
  description: Literal AI Cloud
- url: '{baseUrl}'
  description: Self-hosted Literal AI deployment
  variables:
    baseUrl:
      default: https://cloud.getliteral.ai
      description: LITERAL_API_URL for self-hosted / enterprise installs.
security:
- ApiKeyAuth: []
tags:
- name: GraphQL
paths:
  /api/graphql:
    post:
      operationId: graphql
      tags:
      - GraphQL
      summary: Execute a GraphQL query or mutation.
      description: Single GraphQL endpoint for all Literal AI operations - threads, steps, generations, datasets, experiments, prompts, and scores. The request body carries a GraphQL document and an optional variables object; responses follow the standard GraphQL { data, errors } envelope.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphQLRequest'
            examples:
              getThread:
                summary: Fetch a thread with steps
                value:
                  query: 'query GetThread($id: String!) { thread(id: $id) { id name steps { id type input output } } }'
                  variables:
                    id: thread_123
              createScore:
                summary: Attach a score to a step
                value:
                  query: 'mutation CreateScore($name: String!, $type: ScoreType!, $value: Float!, $stepId: String) { createScore(name: $name, type: $type, value: $value, stepId: $stepId) { id value } }'
                  variables:
                    name: relevance
                    type: HUMAN
                    value: 1
                    stepId: step_456
      responses:
        '200':
          description: GraphQL response. HTTP 200 is returned even for GraphQL-level errors, which appear in the errors array.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQLResponse'
        '401':
          description: Missing or invalid x-api-key.
        '429':
          description: Rate limit / log-unit quota exceeded.
components:
  schemas:
    GraphQLResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Result payload keyed by the requested fields.
        errors:
          type: array
          description: GraphQL execution errors, when present.
          items:
            $ref: '#/components/schemas/GraphQLError'
    GraphQLRequest:
      type: object
      required:
      - query
      properties:
        query:
          type: string
          description: The GraphQL query or mutation document.
        operationName:
          type: string
          description: Name of the operation to run when the document defines several.
        variables:
          type: object
          additionalProperties: true
          description: Variables referenced by the GraphQL document.
    GraphQLError:
      type: object
      properties:
        message:
          type: string
        path:
          type: array
          items:
            type: string
        locations:
          type: array
          items:
            type: object
            properties:
              line:
                type: integer
              column:
                type: integer
        extensions:
          type: object
          additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Project API key from the Literal AI dashboard, supplied via the LITERAL_API_KEY environment variable in the SDKs.