TRAVEL 🌎 Trip Itineraries & Flights for Big Trips

TRAVEL 🌎 Trip Itineraries & Flights for Big Trips · Acciones GPT

Travel Vibes API

  • POST /api/gpt/create_trip_draftCreate a new trip draft and return a trip URL
Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "Travel Vibes API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.travelvibes.ai"
    }
  ],
  "paths": {
    "/api/gpt/create_trip_draft": {
      "post": {
        "operationId": "create_trip_draft",
        "x-openai-isConsequential": false,
        "summary": "Create a new trip draft and return a trip URL",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "initial_context": {
                    "type": "string",
                    "description": "The FULL, rich, structured itinerary as markdown (sections, GFM tables, task lists, 🟒/πŸ”΄ status) β€” built per the 'initial_context format' in EXTRA INSTRUCTIONS.md. Expand well beyond the short outline shown in chat; do NOT copy the chat text. This rich version must NOT be printed in chat."
                  },
                  "gpt_slug": {
                    "type": "string",
                    "default": "gpt-1",
                    "description": "Identifier for this GPT, used for attribution tracking. Always send this value."
                  },
                  "hotel_deals_link": {
                    "type": "string",
                    "description": "The EXACT hotel-deals URL you wrote in the Step 2 callout (https://www.travelvibes.ai/go/hotels?to=...&in=...&out=...), echoed verbatim. Send it whenever the callout was shown; omit if the stay was fully booked and no callout appeared."
                  },
                  "user_preferences": {
                    "type": "array",
                    "description": "Durable facts ABOUT THE TRAVELER gathered in Step 1 (diet, who they travel with, pace, style, must-sees, mobility/budget limits) β€” NOT trip params like dates or destination. Saved to the trip's memory so the Travel Vibes agent remembers them. Send up to ~12.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The fact itself, in the user's language, e.g. \"vegetarian\", \"travels with partner\", \"slow mornings\". Required."
                        },
                        "label": {
                          "type": "string",
                          "description": "Short human-readable category, e.g. \"Dietary\", \"Traveling with\", \"Pace\"."
                        },
                        "key": {
                          "type": "string",
                          "description": "Optional stable lower_snake id, e.g. \"diet\", \"companions\", \"pace\". Omit and the server derives it from the label."
                        },
                        "emoji": {
                          "type": "string",
                          "description": "Optional single emoji for the fact, e.g. \"πŸ₯¬\", \"πŸ‘«\"."
                        }
                      },
                      "required": [
                        "value"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Trip created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "document_id": {
                      "type": "string"
                    },
                    "trip_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "document_id",
                    "trip_url"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}