openapi: 3.2.0 info: title: Decart Client API version: 1.0.0 description: 'Operations tagged Client across 2 of this provider''s published API definitions: decart-api-openapi-original.json, decart-platform-openapi-original.json. Each path carries the servers of the definition it was published in.' tags: - name: Client paths: /v1/client/tokens: post: summary: Create Client Token description: Create an ephemeral API token for client sessions. operationId: create_client_token_v1_client_tokens_post parameters: - name: x-api-key in: header required: true schema: type: string description: API key for authentication title: X-Api-Key description: API key for authentication requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/ClientTokenRequest' - type: 'null' title: Body responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientTokenResponse' '401': description: No or invalid API key provided '403': description: Cannot create client token from a client token '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Client components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError RealtimeConstraints: properties: maxSessionDuration: anyOf: - type: integer - type: 'null' title: Maxsessionduration type: object title: RealtimeConstraints ClientTokenResponse: properties: apiKey: type: string title: Apikey token: anyOf: - type: string - type: 'null' title: Token expiresAt: type: string title: Expiresat permissions: anyOf: - additionalProperties: true type: object - type: 'null' title: Permissions constraints: anyOf: - additionalProperties: true type: object - type: 'null' title: Constraints type: object required: - apiKey - expiresAt title: ClientTokenResponse ClientTokenRequest: properties: expiresIn: anyOf: - type: integer - type: 'null' title: Expiresin description: Seconds until the token expires (default 60) allowedModels: anyOf: - items: type: string type: array - type: 'null' title: Allowedmodels description: Restrict which models this token can access (max 20) allowedOrigins: anyOf: - items: type: string type: array - type: 'null' title: Allowedorigins description: Restrict which web origins this token can be used from (max 20) constraints: anyOf: - $ref: '#/components/schemas/TokenConstraints' - type: 'null' description: Operational limits for the token metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata type: object title: ClientTokenRequest TokenConstraints: properties: realtime: anyOf: - $ref: '#/components/schemas/RealtimeConstraints' - type: 'null' type: object title: TokenConstraints ClientTokenResponse_2: properties: apiKey: type: string title: Apikey expiresAt: type: string title: Expiresat permissions: anyOf: - additionalProperties: true type: object - type: 'null' title: Permissions constraints: anyOf: - additionalProperties: true type: object - type: 'null' title: Constraints type: object required: - apiKey - expiresAt title: ClientTokenResponse x-refined-from: - decart-api-openapi-original.json - decart-platform-openapi-original.json