GenAI & ML JSON Examples

    Modern AI systems exchange structured JSON for predictions, embeddings, and large language model responses.


    Example 1: LLM Text Generation Response

    {
      "id": "chatcmpl-8821",
      "model": "gpt-4.1",
      "output": {
        "text": "JSON is a lightweight data format...",
        "tokensUsed": 124
      },
      "finishReason": "stop",
      "createdAt": "2026-01-11T09:00:00Z"
    }

    Example 2: Text Embedding JSON

    {
      "model": "text-embedding-3-large",
      "input": "JSON Viewer tool",
      "vectorSize": 3072,
      "embeddingId": "emb-7721",
      "usage": {
        "tokens": 6
      }
    }

    Example 3: ML Prediction Result

    {
      "model": "fraud-detection-v2",
      "prediction": "fraud",
      "confidence": 0.91,
      "featuresUsed": 18,
      "transactionId": "TXN-88291",
      "evaluatedAt": "2026-01-11T10:12:00Z"
    }

    Example 4: AI Moderation Output

    {
      "inputId": "msg-1001",
      "flagged": false,
      "categories": {
        "violence": false,
        "hate": false,
        "self_harm": false
      },
      "model": "content-moderation-v1"
    }

    Example 5: Model Training Metadata

    {
      "trainingJobId": "train-5521",
      "datasetSize": 120000,
      "epochs": 10,
      "accuracy": 0.94,
      "loss": 0.12,
      "startedAt": "2026-01-09T08:00:00Z",
      "completedAt": "2026-01-09T11:30:00Z"
    }

    Format & Explore JSON Instantly

    Use these real-world JSON examples to test formatting, validation, and syntax highlighting with our online tool.

    Explore AI JSON with Viewer →