openapi: 3.1.0 info: title: Car Authentication API description: CarAPI provides detailed vehicle information including specifications, pricing, and availability for a wide range of cars. The REST API allows clients to authenticate, look up vehicle models, retrieve trim-level detail, and query enumerated vehicle attributes. version: v1 contact: name: CarAPI Support url: https://carapi.app/ termsOfService: https://carapi.app/ servers: - url: https://carapi.app description: CarAPI production server security: - bearerAuth: [] tags: - name: Authentication description: Endpoints for obtaining a JWT token for API access. paths: /api/auth/login: post: operationId: authLogin summary: Authenticate and Obtain JWT description: Authenticates with CarAPI credentials and returns a JWT bearer token valid for seven days. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LoginRequest' responses: '200': description: A JWT token content: application/json: schema: $ref: '#/components/schemas/GenericObject' '401': $ref: '#/components/responses/Unauthorized' components: schemas: GenericObject: type: object description: Generic JSON object response. additionalProperties: true LoginRequest: type: object description: API credentials used to obtain a JWT token. additionalProperties: true Error: type: object description: Generic error response. properties: code: type: string message: type: string additionalProperties: true responses: Unauthorized: description: Authentication credentials are missing or invalid. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: JWT bearer token obtained from /api/auth/login. externalDocs: description: CarAPI Documentation url: https://carapi.app/docs/ x-generated-from: https://carapi.app/docs/ x-generated-by: claude-crawl-2026-05-08