-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabstract-api-avatars.yaml
More file actions
113 lines (113 loc) · 3.14 KB
/
abstract-api-avatars.yaml
File metadata and controls
113 lines (113 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
openapi: 3.0.3
info:
title: Abstract API - Avatars API
description: Create highly customizable avatar images using a person's name or initials. Supports color, font, and size customization for user profile images.
version: 1.0.0
contact:
url: https://www.abstractapi.com/
x-generated-from: documentation
servers:
- url: https://avatars.abstractapi.com/v1
description: Avatars API v1
security:
- apiKey: []
tags:
- name: Avatars
description: User avatar generation operations
paths:
/:
get:
operationId: generateAvatar
summary: Abstract API Generate Avatar
description: Generate a customizable avatar image using a person's name or initials with configurable colors, fonts, and sizes.
tags:
- Avatars
parameters:
- name: api_key
in: query
required: true
description: Your unique API key for the Avatars API.
schema:
type: string
example: abc123def456
- name: name
in: query
required: true
description: Full name or initials to use for the avatar.
schema:
type: string
example: Jane Smith
- name: size
in: query
required: false
description: Size of the avatar in pixels (square). Defaults to 128.
schema:
type: integer
example: 128
- name: color
in: query
required: false
description: Text color as a hex code (without #).
schema:
type: string
example: FFFFFF
- name: background_color
in: query
required: false
description: Background color as a hex code (without #).
schema:
type: string
example: 4F46E5
- name: font_size
in: query
required: false
description: Font size as a fraction of the avatar size (0.1 to 0.9).
schema:
type: number
example: 0.5
- name: char_count
in: query
required: false
description: Number of characters to use from the name. Defaults to 2.
schema:
type: integer
example: 2
responses:
'200':
description: Avatar image
content:
image/png:
schema:
type: string
format: binary
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
securitySchemes:
apiKey:
type: apiKey
in: query
name: api_key
schemas:
ErrorResponse:
type: object
properties:
message:
type: string
example: The provided API key is invalid
error:
type: string
example: invalid_api_key