{"openapi":"3.1.0","info":{"title":"callyourai API","version":"0.1.0"},"paths":{"/v1/signup":{"post":{"summary":"Signup","description":"Create a user and their first account. Returns an API key at once; no browser needed.","operationId":"signup_v1_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"get":{"summary":"List Keys","operationId":"list_keys_v1_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Key","operationId":"create_key_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"summary":"Revoke Key","operationId":"revoke_key_v1_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/balance":{"get":{"summary":"Balance","operationId":"balance_v1_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/credits/checkout":{"post":{"summary":"Checkout","description":"A hosted payment page for credits. The more you pay at once, the more dollars are credited.","operationId":"checkout_v1_credits_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"summary":"Usage","operationId":"usage_v1_usage_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/avatars":{"get":{"summary":"List Avatars","operationId":"list_avatars_v1_avatars_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Avatar","description":"Create an avatar from a photo of one face. It is ``processing`` until prepared, then ``ready``.","operationId":"create_avatar_v1_avatars_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/avatars/{avatar_id}":{"get":{"summary":"Get Avatar","operationId":"get_avatar_v1_avatars__avatar_id__get","parameters":[{"name":"avatar_id","in":"path","required":true,"schema":{"type":"string","title":"Avatar Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Avatar","operationId":"delete_avatar_v1_avatars__avatar_id__delete","parameters":[{"name":"avatar_id","in":"path","required":true,"schema":{"type":"string","title":"Avatar Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions":{"post":{"summary":"Create Session","description":"Put an avatar into a LiveKit room. ``livekit_token`` is the avatar participant's token.","operationId":"create_session_v1_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}":{"get":{"summary":"Get Session","operationId":"get_session_v1_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Stop Session","operationId":"stop_session_v1_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AvatarBody":{"properties":{"name":{"type":"string","maxLength":80,"title":"Name"},"tier":{"type":"string","enum":["premium","standard"],"title":"Tier","default":"premium"},"image_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Image Url"},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64"}},"type":"object","required":["name"],"title":"AvatarBody"},"CheckoutBody":{"properties":{"amount_usd":{"anyOf":[{"type":"number","maximum":10000.0,"minimum":5.0},{"type":"null"}],"title":"Amount Usd"},"pack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack"}},"type":"object","title":"CheckoutBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyBody":{"properties":{"name":{"type":"string","maxLength":80,"title":"Name","default":"default"}},"type":"object","title":"KeyBody"},"SessionBody":{"properties":{"avatar_id":{"type":"string","title":"Avatar Id"},"livekit_url":{"type":"string","title":"Livekit Url"},"livekit_token":{"type":"string","title":"Livekit Token"},"max_minutes":{"anyOf":[{"type":"number","maximum":240.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Minutes"}},"type":"object","required":["avatar_id","livekit_url","livekit_token"],"title":"SessionBody"},"SignupBody":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"account_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Account Name"}},"type":"object","required":["email"],"title":"SignupBody"},"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"}}}}