AIStoryHub Stories API

Stories owned by the token holder.

Operations 4

GET /stories List your stories #
POST /stories Create a story #
GET /stories/{id} Fetch a single story #
PATCH /stories/{id} Update a story's bible fields, including the outline #

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/aistoryhub-co:aistoryhub-co-stories-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

aistoryhub-co-stories-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AIStoryHub Stories API
  version: 1.0.0
  description: A REST API for reading and creating stories and chapters on AIStoryHub outside the app. Authenticate with a scoped bearer token created under Settings, Developer API. Scopes are explicit, so write access does not imply read access.
  contact:
    url: https://aistoryhub.co/developers
  termsOfService: https://aistoryhub.co/terms
servers:
- url: https://aistoryhub.co/api/v1
security:
- bearerAuth: []
tags:
- name: Stories
  description: Stories owned by the token holder.
paths:
  /stories:
    get:
      operationId: listStories
      tags:
      - Stories
      summary: List your stories
      x-required-scope: stories:read
      parameters:
      - name: limit
        in: query
        description: Max results per page.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: offset
        in: query
        description: Number of results to skip.
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: A page of stories, newest updated first.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - pagination
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Story'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createStory
      tags:
      - Stories
      summary: Create a story
      x-required-scope: stories:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoryCreate'
      responses:
        '201':
          description: The created story.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Story'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
  /stories/{id}:
    get:
      operationId: getStory
      tags:
      - Stories
      summary: Fetch a single story
      x-required-scope: stories:read
      parameters:
      - $ref: '#/components/parameters/StoryId'
      responses:
        '200':
          description: The story.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Story'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    patch:
      operationId: updateStory
      tags:
      - Stories
      summary: Update a story's bible fields, including the outline
      description: 'Provide only the fields to change: logline/genre/tone/etc and the story-level spine (outline).'
      x-required-scope: stories:write
      parameters:
      - $ref: '#/components/parameters/StoryId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoryCreate'
      responses:
        '200':
          description: The updated story.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Story'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Pagination:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
    StoryCreate:
      type: object
      required:
      - title
      properties:
        title:
          type: string
        description:
          type: string
        genre:
          type: string
        tense:
          type: string
        language:
          type: string
        mood:
          type: string
        time_period:
          type: string
        tone:
          type: string
        pov:
          type: string
        banned_words:
          type: array
          items:
            type: string
        target_word_count:
          type: integer
          default: 50000
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
              - unauthorized
              - forbidden
              - invalid_request
              - not_found
              - rate_limited
              - internal_error
            message:
              type: string
    Story:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        description:
          type:
          - string
          - 'null'
        genre:
          type:
          - string
          - 'null'
        tense:
          type:
          - string
          - 'null'
        language:
          type:
          - string
          - 'null'
        mood:
          type:
          - string
          - 'null'
        time_period:
          type:
          - string
          - 'null'
        tone:
          type:
          - string
          - 'null'
        pov:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        is_public:
          type: boolean
        word_count:
          type: integer
        target_word_count:
          type:
          - integer
          - 'null'
        cover_image_url:
          type:
          - string
          - 'null'
          format: uri
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
  responses:
    InvalidRequest:
      description: The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token lacks the scope this endpoint requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, invalid, revoked, or expired token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests. Retry after the delay in the `Retry-After` header.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource does not exist or you do not own it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    StoryId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ash_...
      description: 'Create a token under Settings, Developer API and send it as `Authorization: Bearer ash_...`. Each endpoint requires one scope, listed per-operation via the `x-required-scope` extension; see https://aistoryhub.co/developers for the full scope list.'