{
  "openapi": "3.1.0",
  "info": {
    "title": "Singularity Nightly API",
    "version": "1.0.0",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    },
    "description": "Free, read-only JSON for every edition and the milestone dashboard. Static files, no key. Cite with a link. Singularity Nightly (https://singularitynightly.com), a Wanderlight Inc publication. CC BY 4.0.",
    "contact": {
      "email": "editor@singularitynightly.com"
    }
  },
  "servers": [
    {
      "url": "https://singularitynightly.com"
    }
  ],
  "paths": {
    "/api/v1/editions/index.json": {
      "get": {
        "summary": "Every edition, newest first",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "editions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EditionMeta"
                      }
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      }
                    },
                    "cite": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/editions/latest.json": {
      "get": {
        "summary": "The latest weeknight or weekend edition, in full",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "edition": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/Edition"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      }
                    },
                    "cite": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/editions/{slug}.json": {
      "get": {
        "summary": "One edition in full: every ticker and desk item as data",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Edition"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-10-25-weekend-report"
          }
        ]
      }
    },
    "/api/v1/milestones.json": {
      "get": {
        "summary": "The milestone dashboard data",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/glossary.json": {
      "get": {
        "summary": "The glossary, A to Z",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "terms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Term"
                      }
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      }
                    },
                    "cite": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/editions/{slug}.md": {
      "get": {
        "summary": "The markdown twin of an edition",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-10-25-weekend-report"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EditionMeta": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown_url": {
            "type": "string"
          },
          "json_url": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          }
        }
      },
      "Item": {
        "type": "object",
        "properties": {
          "beat": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "AI",
              "LAUNCH",
              "ORBIT",
              "AIR",
              "MED",
              "DEF",
              "POLICY",
              "TOKEN",
              "WILD",
              null
            ]
          },
          "text": {
            "type": "string"
          },
          "why_it_matters": {
            "type": [
              "string",
              "null"
            ],
            "description": "The plain-English breakdown"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "video_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DeskStory": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Item"
          },
          {
            "type": "object",
            "properties": {
              "desk": {
                "type": "string"
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The story headline; null for a one-line item"
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "url": {
                "type": "string"
              },
              "image_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The story's own image (largest JPEG); null when it has none"
              },
              "image_credit": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "Edition": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EditionMeta"
          },
          {
            "type": "object",
            "properties": {
              "in_60_seconds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The edition in three or four bullets"
              },
              "lead": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "why_it_matters": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "image_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "image_credit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "ticker": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Item"
                }
              },
              "desk_items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeskStory"
                }
              },
              "license": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "cite": {
                "type": "string"
              }
            }
          }
        ]
      },
      "Term": {
        "type": "object",
        "properties": {
          "term": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "definition": {
            "type": "string"
          },
          "link": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  },
  "cite": "Singularity Nightly (https://singularitynightly.com), a Wanderlight Inc publication. CC BY 4.0.",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/"
  }
}
