Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Ayhire Com Account API
version: 1.0.0
contact:
name: AyHire
url: https://ayhire.com
description: 'Operations tagged Account across 2 of this provider''s published API definitions: ayhire-com-openapi.json, ayhire-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ayhire.com
security:
- bearerAuth: []
- apiKeyHeader: []
tags:
- name: Account
description: Who is calling, this hour's usage, and revoking the key in use.
paths:
/api/keys/{id}:
delete:
operationId: revokeKey
summary: Revoke the key making this request
description: 'An API key can revoke only itself: send `current`, or its own id. Other keys are made and revoked in a signed-in browser (Integrations). `ayhire logout` uses this.'
tags:
- Account
parameters:
- name: id
in: path
required: true
description: '`current`, or the id (a UUID) of the key making this request'
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
revoked:
const: true
id:
type: string
format: uuid
required:
- revoked
- id
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
servers:
- url: https://ayhire.com
/api/me:
get:
operationId: whoami
summary: Who the key belongs to
description: The account a key belongs to. `ayhire status` uses it to check a saved key.
tags:
- Account
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
user_id:
type:
- string
- 'null'
email:
type:
- string
- 'null'
auth:
type: string
description: 'How the request authenticated: api_key, session, oauth'
required:
- user_id
- auth
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
servers:
- url: https://ayhire.com
/api/usage:
get:
operationId: getUsage
summary: This hour's analyses and availability checks
description: Reads the counters without using any. Saved results never count.
tags:
- Account
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
analyses:
type: object
properties:
used:
type: integer
limit:
type: integer
reset_at:
type:
- string
- 'null'
required:
- used
- limit
checks:
type: object
properties:
used:
type: integer
limit:
type: integer
reset_at:
type:
- string
- 'null'
required:
- used
- limit
required:
- analyses
- checks
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
servers:
- url: https://ayhire.com
components:
responses:
NotFound:
description: Nothing with that id, or not on your account (code not_found)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: No API key, or a revoked one (code unauthorized)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: The request is not valid (code validation_error)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: An hourly or per-minute limit is spent; the message says when it resets (code rate_limited or github_rate_limited)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: Not allowed for this caller, e.g. a workspace member where an owner is needed (code forbidden)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ServerError:
description: Something failed on AyHire's side (code internal_error)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
error:
type: string
description: What went wrong, in a sentence
code:
type: string
description: Stable code to branch on
enum:
- unauthorized
- forbidden
- not_found
- payment_required
- rate_limited
- github_rate_limited
- validation_error
- internal_error
hint:
type: string
description: What to do about it, when there is something
required:
- error
- code
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: ayh_ API key
description: 'An AyHire API key: Authorization: Bearer ayh_...'
apiKeyHeader:
type: apiKey
in: header
name: x-api-key
description: The same AyHire API key, in x-api-key
externalDocs:
description: AyHire for agents
url: https://ayhire.com/agents.md
x-refined-from:
- ayhire-com-openapi.json
- ayhire-com-openapi.yml